[Lunar-commits] r17937 - lunar-iso/trunk/lunar-install/sbin

Auke Kok sofar at lunar-linux.org
Fri Jan 6 01:26:03 UTC 2006


Author: sofar
Date: 2006-01-06 01:25:57 +0000 (Fri, 06 Jan 2006)
New Revision: 17937

Modified:
   lunar-iso/trunk/lunar-install/sbin/lunar-install
Log:
Fix for #55: sdb hdb etc. have minor device id == 16,32,48 etc... this also causes sdb to show up as partition - full fix.


Modified: lunar-iso/trunk/lunar-install/sbin/lunar-install
===================================================================
--- lunar-iso/trunk/lunar-install/sbin/lunar-install	2006-01-05 19:16:25 UTC (rev 17936)
+++ lunar-iso/trunk/lunar-install/sbin/lunar-install	2006-01-06 01:25:57 UTC (rev 17937)
@@ -177,7 +177,7 @@
 	local MAJOR MINOR BLOCKS NAME JUNK
 	tail +3 /proc/partitions | \
 			while read MAJOR MINOR BLOCKS NAME JUNK; do
-		if [ "$MINOR" == "0" ]; then
+		if [ $((MINOR % 16)) == "0" ]; then
 			echo "$(lsh unmap_device /dev/$NAME)"
 		fi
 	done
@@ -190,7 +190,7 @@
 	local MAJOR MINOR BLOCKS NAME JUNK
 	tail +3 /proc/partitions | \
 			while read MAJOR MINOR BLOCKS NAME JUNK; do
-		if [ "$MINOR" != "0" ]; then
+		if [ $((MINOR % 16)) != "0" ]; then
 			echo "$(lsh unmap_device /dev/$NAME)"
 		fi
 	done



More information about the Lunar-commits mailing list