[PC-BSD Commits] r4013 - pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts
svn at pcbsd.org
svn at pcbsd.org
Mon Jun 1 07:18:52 PDT 2009
Author: kris
Date: 2009-06-01 07:18:52 -0700 (Mon, 01 Jun 2009)
New Revision: 4013
Modified:
pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.Config
pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.FindUpdateParts.sh
pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.InstallCD2.sh
pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountUpgrade.sh
pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.PreUpgrade.sh
pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.SysConfig.sh
Log:
Fixed a few missing /usr/PCBSD entries on install scripts in -current
Modified: pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.Config
===================================================================
--- pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.Config 2009-06-01 14:17:58 UTC (rev 4012)
+++ pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.Config 2009-06-01 14:18:52 UTC (rev 4013)
@@ -1,8 +1,8 @@
#!/bin/sh
# Set our port options
-PKG_DBDIR="/PCBSD/var/db/pkg" ; export PKG_DBDIR
-PORT_DBDIR="/PCBSD/var/db/pkg" ; export PORT_DBDIR
+PKG_DBDIR="/usr/PCBSD/var/db/pkg" ; export PKG_DBDIR
+PORT_DBDIR="/usr/PCBSD/var/db/pkg" ; export PORT_DBDIR
CDMNT="/cdmnt"
FSMNT="/mnt"
@@ -53,7 +53,7 @@
WARDENPBI="TheWarden0.9-PV0.pbi"
# Set the KDE Version
-KDEVER="4.2.3"
+KDEVER="4.2.2"
# Optional Components available on CD/DVD/USB/Network
KDESDK="kdesdk-${KDEVER}.tbz"
Modified: pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.FindUpdateParts.sh
===================================================================
--- pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.FindUpdateParts.sh 2009-06-01 14:17:58 UTC (rev 4012)
+++ pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.FindUpdateParts.sh 2009-06-01 14:18:52 UTC (rev 4013)
@@ -9,6 +9,7 @@
do
# Set our flag that we have not found any mounts
FOUNDMNT="0"
+ ZROOT=""
if [ -e "${i}a.journal" ]
then
@@ -25,6 +26,22 @@
echo "Found: ${i}"
PART="${i}"
+ # Check if this is a ZFS boot partition
+ cat ${FSMNT}/boot/loader.conf | grep '^vfs.root.mountfrom="zfs:' >/dev/null 2>/dev/null
+ if [ "$?" = "0" ]
+ then
+ ZROOT="`cat ${FSMNT}/boot/loader.conf | grep vfs.root.mountfrom | cut -d '=' -f 2 | cut -d ':' -f 2 | cut -d '/' -f 1`"
+ umount ${FSMNT}
+ # Import the zfs pool now
+ zpool import -f ${ZROOT}
+
+ # Now mount the root partition for ZFS
+ mount -t zfs ${ZROOT}/root ${FSMNT}
+
+ # Mount the bootdir now
+ mount ${PART}a ${FSMNT}/bootdir
+ fi
+
touch /tmp/TempUMount
# Check for the partitions in fstab, and mount them now
@@ -54,7 +71,7 @@
- if [ -e "${FSMNT}/PCBSD" ]
+ if [ -e "${FSMNT}/PCBSD" -o -e "${FSMNT}/usr/PCBSD" ]
then
# Create Script
@@ -66,14 +83,14 @@
${PBREG} get /PC-BSD/Version >/.pcver 2>/.pcver
file /bin/sh >/.fbver 2>/.fbver' >${FSMNT}/getver.sh
- chmod 755 ${FSMNT}/getver.sh
- chroot ${FSMNT} /getver.sh
- VER="`cat ${FSMNT}/.pcver`"
- FBVER="`cat ${FSMNT}/.fbver`"
+ chmod 755 ${FSMNT}/getver.sh >/dev/null 2>/dev/null
+ chroot ${FSMNT} /getver.sh >/dev/null 2>/dev/null
+ VER="`cat ${FSMNT}/.pcver 2>/dev/null`"
+ FBVER="`cat ${FSMNT}/.fbver 2>/dev/null`"
# Remove old files
- rm ${FSMNT}/.pcver
- rm ${FSMNT}/.fbver
+ rm ${FSMNT}/.pcver >/dev/null 2>/dev/null
+ rm ${FSMNT}/.fbver >/dev/null 2>/dev/null
rm ${FSMNT}/getver.sh
# Check if this is running FreeBSD 7, otherwise don't upgrade it
@@ -86,11 +103,30 @@
fi # End of if /mnt/PCBSD
- # Unmount FS
- /bin/sh /tmp/TempUMount
- umount /mnt
- rm /tmp/TempUMount
-
+ # If we are on ZFS, cleanup after the mount
+ if [ ! -z "${ZROOT}" ]
+ then
+ umount ${FSMNT}/bootdir
+ /bin/sh /tmp/TempUMount
+ umount ${FSMNT}
+ rm /tmp/TempUMount
+
+ # Remount the bootdir to /mnt
+ mount ${PART}a ${FSMNT}
+
+ # Copy over our ZFS cache data
+ cp /boot/zfs/* ${FSMNT}/boot/zfs/
+
+ # Unmount the /bootdir partition again
+ umount ${FSMNT}
+ else
+ # Unmount FS
+ /bin/sh /tmp/TempUMount
+ umount ${FSMNT}
+ rm /tmp/TempUMount
+ fi
+
+
fi # End of if ${i}a
done
Modified: pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.InstallCD2.sh
===================================================================
--- pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.InstallCD2.sh 2009-06-01 14:17:58 UTC (rev 4012)
+++ pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.InstallCD2.sh 2009-06-01 14:18:52 UTC (rev 4013)
@@ -86,7 +86,7 @@
echo "#!/bin/sh
cd /boot
rm -rf /boot/kernel
-tar xvjpf /PCBSD/kernels/pcbsd-standard.tbz
+tar xvjpf /usr/PCBSD/kernels/pcbsd-standard.tbz
" >${FSMNT}/tmp/RunOnSys.sh
chmod 755 ${FSMNT}/tmp/RunOnSys.sh
Modified: pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountUpgrade.sh
===================================================================
--- pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountUpgrade.sh 2009-06-01 14:17:58 UTC (rev 4012)
+++ pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.MountUpgrade.sh 2009-06-01 14:18:52 UTC (rev 4013)
@@ -17,7 +17,26 @@
mount ${PART}a ${FSMNT}${MNT} >/dev/null 2>/dev/null
fi
+# Check if this is a ZFS boot partition
+cat ${FSMNT}/boot/loader.conf | grep '^vfs.root.mountfrom="zfs:' >/dev/null 2>/dev/null
+if [ "$?" = "0" ]
+then
+ ZROOT="`cat ${FSMNT}/boot/loader.conf | grep vfs.root.mountfrom | cut -d '=' -f 2 | cut -d ':' -f 2 | cut -d '/' -f 1`"
+ umount ${FSMNT}
+ # Import the zfs pool now
+ zpool import -f ${ZROOT}
+ # Now mount the root partition for ZFS
+ mount -t zfs ${ZROOT}/root ${FSMNT}
+
+ # Mount the bootdir now
+ mount ${PART}a ${FSMNT}/bootdir
+ echo "${ZROOT}" >/tmp/upgradeZFS
+ echo "${PART}a" >/uzip/ZFS-bootpart
+ echo "/dev/${ZROOT}" >/uzip/ZFS-root
+fi
+
+
# Check for the partitions in fstab, and mount them now
LIST="d e f g h"
for i in $LIST
Modified: pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.PreUpgrade.sh
===================================================================
--- pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.PreUpgrade.sh 2009-06-01 14:17:58 UTC (rev 4012)
+++ pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.PreUpgrade.sh 2009-06-01 14:18:52 UTC (rev 4013)
@@ -15,6 +15,15 @@
fi
fi
+if [ -e "${FSMNT}/PCBSD/local/kde4/share/config/kdm/kdmrc" ]
+then
+ grep "^AutoLoginEnable=true" ${FSMNT}/PCBSD/local/kde4/share/config/kdm/kdmrc >/dev/null 2>/dev/null
+ if [ "$?" = "0" ]
+ then
+ grep "^AutoLoginUser=" ${FSMNT}/PCBSD/local/kde4/share/config/kdm/kdmrc | cut -d "=" -f 2 >/tmp/autologinuser
+ fi
+fi
+
if [ -e "${FSMNT}/usr/PCBSD/local/kde4/share/config/kdm/kdmrc" ]
then
grep "^AutoLoginEnable=true" ${FSMNT}/usr/PCBSD/local/kde4/share/config/kdm/kdmrc >/dev/null 2>/dev/null
@@ -24,7 +33,14 @@
fi
fi
+
# Save any PBI mime data
+if [ -d "${FSMNT}/PCBSD/local" ]
+then
+ tar cvf ${FSMNT}/pbimimedata.tar ${FSMNT}/PCBSD/local/kde4/share/applnk/.hidden ${FSMNT}/PCBSD/local/share/mime/packages ${FSMNT}/PCBSD/local/share/applications/mimeapps.list
+fi
+
+# Save any PBI mime data
if [ -d "${FSMNT}/usr/PCBSD/local" ]
then
tar cvf ${FSMNT}/pbimimedata.tar ${FSMNT}/usr/PCBSD/local/kde4/share/applnk/.hidden ${FSMNT}/usr/PCBSD/local/share/mime/packages ${FSMNT}/usr/PCBSD/local/share/applications/mimeapps.list
@@ -32,29 +48,34 @@
cd ${FSMNT}
-# Clean up some of the /usr/PCBSD entries before starting an upgrade
+# Clean up some of the /PCBSD entries before starting an upgrade
echo "Cleaning old FileSystem... This may take a while."
chflags -R noschg ${FSMNT}
echo "Cleaning old FileSystem... This may take a while.."
+rm -rf ${FSMNT}/PCBSD/local
rm -rf ${FSMNT}/usr/PCBSD/local
echo "Cleaning old FileSystem... This may take a while..."
+rm -rf ${FSMNT}/PCBSD/Scripts
rm -rf ${FSMNT}/usr/PCBSD/Scripts
+rm -rf ${FSMNT}/PCBSD/bin
rm -rf ${FSMNT}/usr/PCBSD/bin
echo "Cleaning old FileSystem... This may take a while...."
+rm -rf ${FSMNT}/PCBSD/packages
rm -rf ${FSMNT}/usr/PCBSD/packages
+rm -rf ${FSMNT}/PCBSD/Components
rm -rf ${FSMNT}/usr/PCBSD/Components
-rm -rf ${FSMNT}/usr/PCBSD/SystemUpdater
+rm -rf ${FSMNT}/PCBSD/SystemUpdater
echo "Cleaning old FileSystem... This may take a while....."
-rm -rf ${FSMNT}/usr/PCBSD/docs
-rm -rf ${FSMNT}/usr/PCBSD/files
-rm -rf ${FSMNT}/usr/PCBSD/images
-rm -rf ${FSMNT}/usr/PCBSD/includes
-rm -rf ${FSMNT}/usr/PCBSD/kernels
+rm -rf ${FSMNT}/PCBSD/docs
+rm -rf ${FSMNT}/PCBSD/files
+rm -rf ${FSMNT}/PCBSD/images
+rm -rf ${FSMNT}/PCBSD/includes
+rm -rf ${FSMNT}/PCBSD/kernels
echo "Cleaning old FileSystem... This may take a while......"
-rm -rf ${FSMNT}/usr/PCBSD/networkmanager
-rm -rf ${FSMNT}/usr/PCBSD/soundDetect
-rm -rf ${FSMNT}/usr/PCBSD/splash-screens
-rm -rf ${FSMNT}/usr/PCBSD/var
+rm -rf ${FSMNT}/PCBSD/networkmanager
+rm -rf ${FSMNT}/PCBSD/soundDetect
+rm -rf ${FSMNT}/PCBSD/splash-screens
+rm -rf ${FSMNT}/PCBSD/var
echo "Cleaning old FileSystem... This may take a while......."
rm -rf ${FSMNT}/lib
rm -rf ${FSMNT}/libexec
Modified: pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.SysConfig.sh
===================================================================
--- pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.SysConfig.sh 2009-06-01 14:17:58 UTC (rev 4012)
+++ pcbsd/trunk-current/installcd-overlay/usr/local/pcbsd/scripts/PCBSD.SysConfig.sh 2009-06-01 14:18:52 UTC (rev 4013)
@@ -169,24 +169,27 @@
BASENAME="`echo $ZFSROOT | cut -d '/' -f 3`"
ZFSBOOTPART="`cat /uzip/ZFS-bootpart`"
- # Setup our loader.conf entries for ZFS
- echo 'zfs_load="YES"' >> ${FSMNT}/boot/loader.conf
- echo "vfs.root.mountfrom=\"zfs:${BASENAME}/root\"" >> ${FSMNT}/boot/loader.conf
- echo 'vm.kmem_size="512M"' >>${FSMNT}/boot/loader.conf
- echo 'vm.kmem_size_max="512M"' >>${FSMNT}/boot/loader.conf
+ if [ ! -e "/tmp/upgradeZFS" ]
+ then
- # Enable zfs in /etc/rc.conf
- echo 'zfs_enable="YES"' >> ${FSMNT}/etc/rc.conf
+ # Setup our loader.conf entries for ZFS
+ echo 'zfs_load="YES"' >> ${FSMNT}/boot/loader.conf
+ echo "vfs.root.mountfrom=\"zfs:${BASENAME}/root\"" >> ${FSMNT}/boot/loader.conf
+ echo 'vm.kmem_size="512M"' >>${FSMNT}/boot/loader.conf
+ echo 'vm.kmem_size_max="512M"' >>${FSMNT}/boot/loader.conf
- # Copy over the /etc/hostid from our install CD to the HD
- cp /etc/hostid ${FSMNT}/etc/hostid
+ # Enable zfs in /etc/rc.conf
+ echo 'zfs_enable="YES"' >> ${FSMNT}/etc/rc.conf
- # Move the kernel to /bootdir so we can bootup properly
- mv -f ${FSMNT}/boot ${FSMNT}/bootdir/
+ # Copy over the /etc/hostid from our install CD to the HD
+ cp /etc/hostid ${FSMNT}/etc/hostid
- # Create our link to /boot on the ZFS partition
- ln -s /bootdir/boot ${FSMNT}/boot
+ # Move the kernel to /bootdir so we can bootup properly
+ mv -f ${FSMNT}/boot ${FSMNT}/bootdir/
+ # Create our link to /boot on the ZFS partition
+ ln -s /bootdir/boot ${FSMNT}/boot
+ fi
# Reset our mount points for any extra ZFS partitions
cd /uzip/zfsmnts/
More information about the Commits
mailing list