diff options
author | Rob Austein <sra@hactrn.net> | 2013-02-28 01:10:14 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2013-02-28 01:10:14 +0000 |
commit | fa8491add8e4a5895ea96f5f5cb1f01273185f0e (patch) | |
tree | 32900fb1a23f9d6b3b3ac2a1bc12acd649c72d4c /rcynic | |
parent | e35830025d23430989f95f7b507fd4ea58d9851a (diff) |
Fix rcynic installation rules broken in packaging branch merge.
Fixes #428 and 429.
svn path=/trunk/; revision=5089
Diffstat (limited to 'rcynic')
-rw-r--r-- | rcynic/Makefile.in | 2 | ||||
-rw-r--r-- | rcynic/rules.linux.mk | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/rcynic/Makefile.in b/rcynic/Makefile.in index 71f46df2..7b1b7662 100644 --- a/rcynic/Makefile.in +++ b/rcynic/Makefile.in @@ -227,7 +227,7 @@ ${DESTDIR}${bindir}/validation_status: validation_status .FORCE: install-crontab: .FORCE - @echo "Setting up ${RCYNIC_CRON_USER}'s crontab to run rcynic-cron script + @echo "Setting up ${RCYNIC_CRON_USER}'s crontab to run rcynic-cron script" @crontab -l -u ${RCYNIC_CRON_USER} 2>/dev/null | \ ${AWK} -v t=`hexdump -n 2 -e '"%u\n"' /dev/random` '\ BEGIN { \ diff --git a/rcynic/rules.linux.mk b/rcynic/rules.linux.mk index abb9db64..84275361 100644 --- a/rcynic/rules.linux.mk +++ b/rcynic/rules.linux.mk @@ -1,7 +1,7 @@ # $Id$ install-user-and-group: .FORCE - @if ${AWK} -F: 'BEGIN {status = 1} $$1 == ${RCYNIC_GROUP} {status = 0} END {exit status}' /etc/group; \ + @if getent group ${RCYNIC_GROUP} >/dev/null; \ then \ echo "You already have a group \"${RCYNIC_GROUP}\", so I will use it."; \ elif /usr/sbin/groupadd ${RCYNIC_GROUP}; \ @@ -13,10 +13,10 @@ install-user-and-group: .FORCE exit 1; \ fi @nogroup='-N'; \ - if test -f /etc/redhat-release; then; read vendor release version < /etc/redhat-release; if test $$vendor = CentOS; then; nogroup='-n'; fi; fi; \ - if ${AWK} -F: 'BEGIN {status = 1} $$1 == ${RCYNIC_USER} {status = 0} END {exit status}' /etc/passwd; \ + if test -f /etc/redhat-release; then read vendor release version < /etc/redhat-release; if test $$vendor = CentOS; then nogroup='-n'; fi; fi; \ + if getent passwd ${RCYNIC_USER} >/dev/null; \ then \ - echo "You already have a user \"${RCYNIC_USER}\", so I will use it." \ + echo "You already have a user \"${RCYNIC_USER}\", so I will use it."; \ elif /usr/sbin/useradd -g ${RCYNIC_GROUP} -M $$nogroup -d "${RCYNIC_DIR}" -s /sbin/nologin -c "${RCYNIC_GECOS}" ${RCYNIC_USER}; \ then \ echo "Added user \"${RCYNIC_USER}\"."; \ |