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

svn at pcbsd.org svn at pcbsd.org
Mon Jul 9 12:58:09 PDT 2007

Author: kris
Date: 2007-07-09 20:58:09 +0100 (Mon, 09 Jul 2007)
New Revision: 436


Made changes to upgrade script to save /usr/src and /usr/ports from being
deleted during an upgrade. 

Modified: pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountUpgrade.sh
--- pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountUpgrade.sh	2007-07-09 18:12:12 UTC (rev 435)
+++ pcbsd/trunk/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountUpgrade.sh	2007-07-09 19:58:09 UTC (rev 436)
@@ -32,11 +32,16 @@
 echo "Cleaning up old installation..."
 chflags -R noschg /mnt
+mv /mnt/usr/ports /mnt/ports 2>/dev/null
+mv /mnt/usr/src /mnt/src 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 
 rm -rf var 2>/dev/null
+mkdir -p /mnt/usr
+mv /mnt/ports /mnt/usr/ports 2>/dev/null
+mv /mnt/src /mnt/usr/src 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

More information about the Commits mailing list