[SCM] live-startscripts branch, master, updated. a121b6a74d98ca0a16738196d86c181dc840dad5

Richard Nelson unixabg at gmail.com
Mon Oct 26 21:59:20 UTC 2009


The following commit has been merged in the master branch:
commit b1a361339ec84c617847553d9a78e891d854ce6c
Author: Richard Nelson <unixabg at gmail.com>
Date:   Mon Oct 26 16:50:34 2009 -0500

    Attempt to find what to mount earlier in the script since the images may now be on a local block device.

diff --git a/initscripts/live-vmware-player b/initscripts/live-vmware-player
index 69df275..f04cfab 100755
--- a/initscripts/live-vmware-player
+++ b/initscripts/live-vmware-player
@@ -58,6 +58,25 @@ do_start ()
 				break
 			fi
 
+			echo "Checking for a local scratch device." >> /var/log/live-vmware-player.log
+
+			# Try to find a partition labeled vmware and if not then try first partition on first drive of the unit.
+			MOUNTDEV="$(blkid | grep vmware | awk -F: '{print $1}')"
+			if [ -z "${MOUNTDEV}" ]
+			then
+				MOUNTDEV="$(fdisk -l | grep a1 | awk '{print $1}')"
+			fi
+			echo "Potential scratch devices of: ${MOUNTDEV}" >> /var/log/live-vmware-player.log
+
+			echo "Checking for clean scratch file system on ${MOUNTDEV}!" >> /var/log/live-vmware-player.log
+			fsck -C -a ${MOUNTDEV}
+
+			echo "Making the /vmware directory where we will compose the operations for the image." >> /var/log/live-vmware-player.log
+			mkdir -p /vmware
+
+			echo "Attempting to mount local scratch device." >> /var/log/live-vmware-player.log
+			mount -v ${MOUNTDEV} /vmware
+
 			# Ok here is where we need to determine info passed to do the magic.
 			ACTION="$(echo ${x#custom_options=} | awk -F: '{print $1}')"
 			echo "ACTION of ${ACTION} " >> /var/log/live-vmware-player.log
@@ -128,18 +147,6 @@ EOF
 			echo "Setting permissions on the users .vmware folder." >> /var/log/live-vmware-player.log
 			chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.vmware
 
-			echo "Making the /vmware directory where we will compose the operations for the image." >> /var/log/live-vmware-player.log
-			mkdir -p /vmware
-
-			echo "Checking for a local scratch device." >> /var/log/live-vmware-player.log
-			# Try to find a partition labeled vmware and if not then try first partition on first drive of the unit.
-			MOUNTDEV="$(blkid | grep vmware | awk -F: '{print $1}')"
-			if [ -z "${MOUNTDEV}" ]
-			then
-				MOUNTDEV="$(fdisk -l | grep a1 | awk '{print $1}')"
-			fi
-			echo "Potential scratch devices of: ${MOUNTDEV}" >> /var/log/live-vmware-player.log
-
 			########################################################################
 			# Below is where I use a variable named CRELEASE which is sourced in
 			# from the image directory.
@@ -163,12 +170,6 @@ EOF
 
 			echo "Preparing VMware image version ${CRELEASE}" >> /var/log/live-vmware-player.log
 
-			echo "Checking for clean scratch file system on ${MOUNTDEV}!" >> /var/log/live-vmware-player.log
-			fsck -C -a ${MOUNTDEV}
-
-			echo "Attempting to mount local scratch device." >> /var/log/live-vmware-player.log
-			mount -v ${MOUNTDEV} /vmware
-
 			echo "Checking to see if scratch was requested at boot." >> /var/log/live-vmware-player.log
 			if [ "${ACTION}" = "scratch" ]
 			then

-- 
live-startscripts



More information about the debian-live-changes mailing list