CVS: moonbase/zbeta/initscripts BUILD,1.2,1.3

Chuck Mead csm at lunar-linux.org
Wed Oct 29 01:41:02 GMT 2003


Update of /var/cvs/lunar/moonbase/zbeta/initscripts
In directory dbguin.lunar-linux.org:/tmp/cvs-serv24676

Modified Files:
	BUILD 
Log Message:
more mod's... making it safer!

later... once the process is complete we need to remove the whole "backup /etc thing"


Index: BUILD
===================================================================
RCS file: /var/cvs/lunar/moonbase/zbeta/initscripts/BUILD,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- BUILD	29 Oct 2003 01:03:47 -0000	1.2
+++ BUILD	29 Oct 2003 01:41:00 -0000	1.3
@@ -1,15 +1,22 @@
 (
-  tar cjvf etc.tar.bz2 /etc                                      &&
-  chmod 0600 etc.tar.bz2                                         &&
-  mv etc.tar.bz2 /var/cache/lunar                                &&
-  echo "Your old /etc directory is stored in /var/cache/lunar!"  &&
-  echo ""                                                        &&
-  sleep 2                                                        &&
+
+  A=`date +%s`                                                               &&
+  if [ -e /var/cache/lunar/etc.tar.bz2 ]; then                               
+     mv /var/cache/lunar/etc.tar.bz2 /var/cache/lunar/etc.tar.bz2.$A
+  fi                                                                         &&
+  echo "Backing up existing /etc directory!"                                 &&
+  echo ""                                                                    &&
+  tar cjf etc.tar.bz2 /etc                                                   &&
+  chmod 0600 etc.tar.bz2                                                     &&
+  mv etc.tar.bz2 /var/cache/lunar                                            &&
+  echo "Your old /etc directory is stored in /var/cache/lunar/etc.tar.bz2!"  &&
+  echo ""                                                                    &&
+  sleep 2                                                                    &&
   if [ ! -d /etc/sysconfig ]; then
      mv /etc/config.d /etc/sysconfig
      mv /etc/sysconfig/network /etc/sysconfig/network.old
      ln -s /etc/sysconfig /etc/config.d
-     rm -Rf /etc/rcS.d
+     rm -Rf /etc/rcS.d /etc/init.d
   fi                                                       &&
 
   for i in $(seq 0 6);do 




More information about the Lunar-commits mailing list