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

svn at pcbsd.org svn at pcbsd.org
Mon Aug 6 10:39:29 PDT 2007


Author: kris
Date: 2007-08-06 10:39:29 -0700 (Mon, 06 Aug 2007)
New Revision: 562

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

Changed upgrade process so that existing data is simply moved instead of
compressed into tar ball. Should speed the process of upgrading up greatly



Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountUpgrade.sh
===================================================================
--- pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountUpgrade.sh	2007-08-06 15:50:47 UTC (rev 561)
+++ pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountUpgrade.sh	2007-08-06 17:39:29 UTC (rev 562)
@@ -28,8 +28,21 @@
 
 
 #Backup the various user data 
-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
+echo "Saving user data..."
+mkdir -p /mnt/tmp/upgradebackup
+mv /mnt/usr/local/share/applnk /mnt/tmp/upgradebackup/
+mv /mnt/usr/local/share/config/kdm/kdmrc /mnt/tmp/upgradebackup/
+mv /mnt/usr/local/MyPrograms /mnt/tmp/upgradebackup/
+mv /mnt/Programs /mnt/tmp/upgradebackup/
+mv /mnt/usr/Programs /mnt/tmp/upgradebackup/usrPrograms
+mv /mnt/usr/home /mnt/tmp/upgradebackup/usrhome
+mv /mnt/home /mnt/tmp/upgradebackup/home
+mv /mnt/root /mnt/tmp/upgradebackup/root
 
+
+
+
+
 echo "Cleaning up old installation..."
 chflags -R noschg /mnt
 mv /mnt/usr/ports /mnt/ports 2>/dev/null
@@ -62,14 +75,23 @@
 #echo "............";
 cp f /usr/local/pcbsd/LANGS/* /mnt/PCBSD/LANGS/ >/dev/null
 
-# Restore old links
-
+# Restore old data
 echo "Restoring saved data..."
+rm -rf /mnt/Programs
+rm -rf /mnt/usr/Programs
+rm -rf /mnt/home
+rm -rf /mnt/usr/home
+rm -rf /mnt/root
 
-tar xpvzf userdata.tgz >/dev/null 2>/dev/null
+mv -f /mnt/tmp/upgradebackup/applnk /mnt/usr/local/share/applnk
+mv -f /mnt/tmp/upgradebackup/kdmrc /mnt/usr/local/share/config/kdm/kdmrc
+mv -f /mnt/tmp/upgradebackup/MyPrograms /mnt/usr/local/MyPrograms
+mv -f /mnt/tmp/upgradebackup/Programs /mnt/Programs
+mv -f /mnt/tmp/upgradebackup/usrPrograms /mnt/usr/Programs
+mv -f /mnt/tmp/upgradebackup/usrhome /mnt/usr/home
+mv -f /mnt/tmp/upgradebackup/home /mnt/home
+mv -f /mnt/tmp/upgradebackup/root /mnt/root
 
-#rm -f userdata.tgz
-
 cd /
 
 # Make directories for src / obj / ports



More information about the Commits mailing list