]> granicus.if.org Git - fcron/commitdiff
bug corrected : IS_FREEBSD was requested before being set
authorthib <thib>
Wed, 7 Mar 2001 19:32:21 +0000 (19:32 +0000)
committerthib <thib>
Wed, 7 Mar 2001 19:32:21 +0000 (19:32 +0000)
script/user-group

index 9b5eb4e38bb0024429238ea874d31d06a715eace..255f2a4ab08cea8230c9ea29b7ae5f31a1ed0684 100755 (executable)
@@ -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."