diff options
author | bad <bad@pkgsrc.org> | 1999-06-08 17:58:49 +0000 |
---|---|---|
committer | bad <bad@pkgsrc.org> | 1999-06-08 17:58:49 +0000 |
commit | a861a9543bee8e912fa7b3c134b1f41ddb9e788f (patch) | |
tree | 8dd746d14135aef8e76d1fa5adb18e798e6fbbf7 /mail | |
parent | 1fb38505ee4687c1072273a8334f4aab1e444042 (diff) | |
download | pkgsrc-a861a9543bee8e912fa7b3c134b1f41ddb9e788f.tar.gz |
Check for group before invoking addnerd since the latter won't work
correctly when the required group is missing.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/majordomo/pkg/REQ | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/mail/majordomo/pkg/REQ b/mail/majordomo/pkg/REQ index bf4f4d67b94..959f3f28ff7 100644 --- a/mail/majordomo/pkg/REQ +++ b/mail/majordomo/pkg/REQ @@ -15,17 +15,6 @@ then fi -# use finger to be able to use NIS, ... -if finger ${MAJORDOMO_USER} 2>&1 | grep >/dev/null "no such user" -then - echo "Creating '$MAJORDOMO_USER' user ..." - ${ADDNERD} -h ${HOME} -g ${MAJORDOMO_GROUP} ${MAJORDOMO_USER} - echo Done. -else - echo "User '$MAJORDOMO_USER' already exists, proceeding." -fi - - # Group... the default's shipped with NetBSD # if grep "^${MAJORDOMO_GROUP}:" /etc/group 2>&1 >/dev/null @@ -36,6 +25,17 @@ else exit 1 fi + +# use finger to be able to use NIS, ... +if finger ${MAJORDOMO_USER} 2>&1 | grep >/dev/null "no such user" +then + echo "Creating '$MAJORDOMO_USER' user ..." + ${ADDNERD} -h ${HOME} -g ${MAJORDOMO_GROUP} ${MAJORDOMO_USER} + echo Done. +else + echo "User '$MAJORDOMO_USER' already exists, proceeding." +fi + # Home... in case the login exists but not the home directory # install -d -m 775 -o ${MAJORDOMO_USER} -g ${MAJORDOMO_GROUP} ${HOME}/${MAJORDOMO_USER} |