[Lunar-commits] r14965 - moonbase/trunk/security/shadow

Auke Kok sofar at lunar-linux.org
Mon May 23 11:00:06 UTC 2005


Author: sofar
Date: 2005-05-23 11:00:03 +0000 (Mon, 23 May 2005)
New Revision: 14965

Modified:
   moonbase/trunk/security/shadow/BUILD
Log:
Make sure files are NOT oprhaned already from the start. !


Modified: moonbase/trunk/security/shadow/BUILD
===================================================================
--- moonbase/trunk/security/shadow/BUILD	2005-05-23 08:34:44 UTC (rev 14964)
+++ moonbase/trunk/security/shadow/BUILD	2005-05-23 11:00:03 UTC (rev 14965)
@@ -6,8 +6,8 @@
     WITH_LIBPAM="--with-libpam"
   fi
 
-  sedit "s/CRACKLIB_DICTPATH	\/var\/cache\/cracklib\/cracklib_dict/CRACKLIB_DICTPATH	\/usr\/share\/dict\/pw_dict/" etc/login.defs.linux
-  sedit "s/#MD5_CRYPT_ENAB	no/MD5_CRYPT_ENAB	yes/" etc/login.defs.linux
+  sedit "s/CRACKLIB_DICTPATH    \/var\/cache\/cracklib\/cracklib_dict/CRACKLIB_DICTPATH \/usr\/share\/dict\/pw_dict/" etc/login.defs.linux
+  sedit "s/#MD5_CRYPT_ENAB      no/MD5_CRYPT_ENAB       yes/" etc/login.defs.linux
 
   touch *
 
@@ -18,26 +18,19 @@
                --with-libcrack       \
                $WITH_LIBPAM          \
                $OPTS                &&
- 
-  default_make
 
-) > $C_FIFO 2>&1  && (
+  default_make || return 1
 
+  for FILE in limits login.access login.defs.linux defaults ; do
+    [ -e /etc/$FILE ] || install etc/$FILE /etc/
+  done
+  [ -e /etc/login.defs ] || install etc/login.defs.linux /etc/login.defs
+  [ -e /etc/securetty  ] || install $SCRIPT_DIRECTORY/securetty /etc/
+  ln -sf /usr/sbin/vipw /usr/sbin/vigr &&
+  install $SCRIPT_DIRECTORY/adduser /usr/sbin/ &&
+  install $SCRIPT_DIRECTORY/deluser /usr/sbin/ &&
 
-  cd  etc
+  sedit "s/CRACKLIB_DICTPATH    \/var\/cache\/cracklib\/cracklib_dict/CRACKLIB_DICTPATH \/usr\/share\/dict\/pw_dict/" /etc/login.defs
+  sedit "s/#MD5_CRYPT_ENAB      no/MD5_CRYPT_ENAB       yes/" /etc/login.defs
 
-  [  -e  /etc/limits           ]  ||  cp  limits            /etc
-  [  -e  /etc/login.access     ]  ||  cp  login.access      /etc
-  [  -e  /etc/login.defs.linux ]  ||  cp  login.defs.linux  /etc
-  [  -e  /etc/login.defs       ]  ||  cp  login.defs.linux  /etc/login.defs
-  [  -e  /etc/defaults         ]  ||  mkdir                 /etc/defaults
-  [  -f  /usr/sbin/vigr        ]  ||  ln  /usr/sbin/vipw    /usr/sbin/vigr
-  [  -f  /etc/securetty        ]  ||  cp  $SCRIPT_DIRECTORY/securetty /etc
-
-  sedit "s/CRACKLIB_DICTPATH	\/var\/cache\/cracklib\/cracklib_dict/CRACKLIB_DICTPATH	\/usr\/share\/dict\/pw_dict/" /etc/login.defs
-  sedit "s/#MD5_CRYPT_ENAB	no/MD5_CRYPT_ENAB	yes/" /etc/login.defs
-
-  cp  $SCRIPT_DIRECTORY/adduser  /usr/sbin
-  cp  $SCRIPT_DIRECTORY/deluser  /usr/sbin
-
-)
+) > $C_FIFO 2>&1



More information about the Lunar-commits mailing list