Options check for join

Sat, 15 Aug 2009 14:29:03 +0200

author
Michiel Broek <mbroek@mbse.eu>
date
Sat, 15 Aug 2009 14:29:03 +0200
changeset 9
3b982acb3d07
parent 8
5209729bbbac
child 10
e9b5e53f1d0b

Options check for join

security.d/chk_passwd file | annotate | diff | comparison | revisions
--- a/security.d/chk_passwd	Sat Aug 15 14:04:50 2009 +0200
+++ b/security.d/chk_passwd	Sat Aug 15 14:29:03 2009 +0200
@@ -52,9 +52,15 @@
 COMBINED=secure3.$$
 OUTPUT=secure4.$$
 
+
 # Combine passwd and shadow files.
 #
-join --nocheck-order -t : -j 1 $MP $SP > $COMBINED
+JOPT=$( join --help | grep "\--nocheck-order")
+if [ -z "$JOPT" ]; then
+    join -t : -j 1 $MP $SP > $COMBINED
+else
+    join --nocheck-order -t : -j 1 $MP $SP > $COMBINED
+fi
 
 
 # These are used several times.

mercurial