[PC-BSD Commits] r312 - pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts

svn at pcbsd.org svn at pcbsd.org
Fri Jun 8 15:42:23 PDT 2007


Author: kris
Date: 2007-06-08 23:42:23 +0100 (Fri, 08 Jun 2007)
New Revision: 312

Modified:
   pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountUpgrade.sh
Log:

More cleanup for the upgrade process



Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountUpgrade.sh
===================================================================
--- pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountUpgrade.sh	2007-06-08 22:30:33 UTC (rev 311)
+++ pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountUpgrade.sh	2007-06-08 22:42:23 UTC (rev 312)
@@ -21,30 +21,26 @@
 MNT2="`cat /mnt/etc/fstab | grep ${PART}g | cut -f 2 | cut -d " " -f 1`" >/dev/null 2>/dev/null
 mount ${PART}g /mnt${MNT2} >/dev/null 2>/dev/null
 
-sleep 2
+sleep 1
 
 echo "..."
+cd /mnt
 
 
 #Backup the various user data 
-tar cvzf /mnt/userdata.tgz "/mnt/usr/local/share/applnk/My Programs" /mnt/usr/local/share/config/kdm/kdmrc "/mnt/usr/local/MyPrograms" "/mnt/Programs" "/mnt/usr/Programs" "/mnt/home" "/mnt/root" "/mnt/etc/fstab" "/mnt/usr/home" >/dev/null 2>/dev/null
+tar cvzf userdata.tgz "usr/local/share/applnk/My Programs" usr/local/share/config/kdm/kdmrc usr/local/MyPrograms Programs usr/Programs home root usr/home >/dev/null 2>/dev/null
 
-mkdir /mnt/savebin
-
 echo "Cleaning up old installation..."
-rm -rf /mnt/usr/ 2>/dev/null
-#rm -rf /mnt/etc 2>/dev/null
-rm -rf /mnt/boot 2>/dev/null
-#rm -rf /mnt/var 2>/dev/null
-rm -rf /mnt/lib 2>/dev/null
-rm -rf /mnt/libexec 2>/dev/null 
+rm -rf usr 2>/dev/null
+rm -rf boot 2>/dev/null
+rm -rf lib 2>/dev/null
+rm -rf libexec 2>/dev/null 
 
 mv /mnt/etc/X11/XF86Config /mnt/etc/X11/XF86Config.preUpgrade 2>/dev/null
 mv /mnt/etc/X11/xorg.conf /mnt/etc/X11/xorg.conf.preUpgrade 2>/dev/null
 rm /mnt/var/run/denyhosts.pid
 
 # Start the Tar Extraction now
-cd /mnt
 echo "........."
 
 # Unset LANG variable
@@ -60,14 +56,15 @@
 cp f /usr/local/pcbsd/LANGS/* /mnt/PCBSD/LANGS/ >/dev/null
 
 # Restore old links
-cd /
 
-echo ".................."
+echo "Restoring saved data..."
 
-tar xpvzf /mnt/userdata.tgz >/dev/null 2>/dev/null
+tar xpvzf userdata.tgz >/dev/null 2>/dev/null
 
-rm -rf /mnt/userdata.tgz
+#rm -f userdata.tgz
 
+cd /
+
 # Make directories for src / obj / ports
 mkdir /mnt/usr/src >/dev/null 2>/dev/null
 mkdir /mnt/usr/obj >/dev/null 2>/dev/null
@@ -132,15 +129,6 @@
 
 cp /cdmnt/boot/beastie.4th /mnt/boot/
 
-# Start copying over KDE prefs and such
-cd /mnt/usr/home
-for i in `ls`
-do
-  cd /mnt/usr/share/skel/
-  tar cvf - ./Images/.directory ./Video/.directory ./Music/.directory ./Documents/.directory | tar xvf - -C /mnt/usr/home/${i} 
-  cd /mnt/usr/home
-done
-
 # Reset the LANG stuff
 MM_CHARSET="UTF-8" ; export MM_CHARSET
 LANG="en_US.UTF-8" ; export LANG



More information about the Commits mailing list