]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Fix so that faxsetup.linux properly detects the lack of a -M option.
authorRobert Colquhoun <rjc@trump.net.au>
Tue, 19 Sep 2000 01:28:19 +0000 (01:28 +0000)
committerRobert Colquhoun <rjc@trump.net.au>
Tue, 19 Sep 2000 01:28:19 +0000 (01:28 +0000)
etc/faxsetup.linux

index d6846d65b8e087da8219e330edd145b432fe1707..1de4092a315482157943dd2b18038d82353af2cb 100644 (file)
 addPasswd()
 {
     if [ -z "`useradd 2>&1 | grep -- -o`" ]; then
+        # useradd does *not* support the -o option
         useradd -c 'Facsimile Agent' -d $4 -s /bin/false $1;
         usermod -u $2 -o -g $3 $1;
-    elif [ -z "`useradd -M 2>&1 | grep invalid`" ]; then
+    elif [ -z "`useradd -M 2>&1 | grep -E 'invalid|illegal'`" ]; then
+        # useradd supports the -M option
         useradd -M -c 'Facsimile Agent' -d $4 -u $2 -o -g $3 -s /bin/false $1;
     else
+        # useradd does *not* support the -M option
         useradd -c 'Facsimile Agent' -d $4 -u $2 -o -g $3 -s /bin/false $1;
     fi
 }