]> granicus.if.org Git - fcron/commitdiff
added a test (fix a pb if /etc/pam.conf does not exist)
authorthib <thib>
Mon, 29 Dec 2003 15:40:52 +0000 (15:40 +0000)
committerthib <thib>
Mon, 29 Dec 2003 15:40:52 +0000 (15:40 +0000)
script/install-pam-conf

index c1f50c5f7d1c7de679759d6017d7c6c5cd53a842..91c1c5f1d8dffa997caf8441d690c456400bf341 100755 (executable)
@@ -2,7 +2,7 @@
 # Install fcron and fcrontab's pam conf files.
 #
 
-# $Id: install-pam-conf,v 1.2 2001-11-04 19:00:52 thib Exp $
+# $Id: install-pam-conf,v 1.3 2003-12-29 15:40:52 thib Exp $
 
 if test $# -ne 5; then
   echo "Too few/many arguments"
@@ -17,7 +17,7 @@ INSTALL=$5
 
 for i in fcron fcrontab; do
 # test for both space and tab in the grep
-  if test -f $ETC/pam.d/$i || grep "$i[        ]" $ETC/pam.conf 1> /dev/null; then
+  if test -f $ETC/pam.d/$i || ( test -f $ETC/pam.conf && grep "$i[     ]" $ETC/pam.conf 1> /dev/null ); then
     echo "Seems that there is already some pam conf about $i ..."
   else
     if test -d $ETC/pam.d; then