From: Thibault Godouet Date: Wed, 7 Mar 2001 19:32:21 +0000 (+0000) Subject: bug corrected : IS_FREEBSD was requested before being set X-Git-Tag: ver2_9_4~388 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf0ec72a1633e7291bfc5181b9611d1b6ccc53bf;p=thirdparty%2Ffcron.git bug corrected : IS_FREEBSD was requested before being set --- diff --git a/script/user-group b/script/user-group index 9b5eb4e..255f2a4 100755 --- a/script/user-group +++ b/script/user-group @@ -4,7 +4,7 @@ # them if necessary. # -# $Id: user-group,v 1.7 2001-03-01 18:39:03 thib Exp $ +# $Id: user-group,v 1.8 2001-03-07 19:32:21 thib Exp $ # take 3 arguments : username # groupname @@ -24,6 +24,12 @@ ANSWER=$3 INSTALL="nothing" INSTALLED=0 +if test `uname -s` = "FreeBSD"; then + IS_FREEBSD=1 +else + IS_FREEBSD=0 +fi + if test $IS_FREEBSD -eq 1; then CMD="pw groupadd $GROUPNAME" else @@ -78,12 +84,6 @@ GID="`cat /etc/group | grep fcron | awk -F ":" '{print $3}'`" INSTALL="nothing" INSTALLED=0 -if test `uname -s` = "FreeBSD"; then - IS_FREEBSD=1 -else - IS_FREEBSD=0 -fi - echo -n "Checking if $USERNAME is in /etc/passwd ... " if grep "^$USERNAME:" /etc/passwd > /dev/null; then echo "yes."