[SCM] live-initramfs branch, master, updated. debian/1.177.1-1-3-g5caf4df

Daniel Baumann daniel at debian.org
Fri Apr 2 14:38:31 UTC 2010


The following commit has been merged in the master branch:
commit 5caf4df359c566f140a719aabac07f926e621d11
Author: Michael Prokop <mika at grml.org>
Date:   Fri Apr 2 16:33:23 2010 +0200

    Prefer removable devices over non-removable devices, so scan them first.

diff --git a/scripts/live b/scripts/live
index bae9193..8ad11bb 100755
--- a/scripts/live
+++ b/scripts/live
@@ -1627,8 +1627,20 @@ find_livefs ()
 	esac
 
 	# or do the scan of block devices
+	# prefer removable devices over non-removable devices, so scan them first
 	for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -vE "/(loop|ram|dm-|fd)")
 	do
+		if [ "$(cat ${sysblock}/removable)" = "1" ]
+		then
+			removable_devices_to_scan="$removable_devices_to_scan $sysblock"
+		else
+			nonremovable_devices_to_scan="$nonremovable_devices_to_scan $sysblock"
+		fi
+	done
+	devices_to_scan="$removable_devices_to_scan $nonremovable_devices_to_scan"
+
+	for sysblock in $devices_to_scan
+	do
 		devname=$(sys2dev "${sysblock}")
 		fstype=$(get_fstype "${devname}")
 

-- 
live-initramfs



More information about the debian-live-changes mailing list