[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH] fixed USB detection for newer kernels



Hi

Detection of USB flash drives in the live script of live-initramfs is
broken for newer kernels (>= 2.6.28). The attached patch fixes this bug.

Regards

Ronny Standtke

-- 
Ronny Standtke                 Fachhochschule Nordwestschweiz
Dozent Medienpädagogik / ICT   Pädagogische Hochschule
Telefon: +41 32 627 92 47      Obere Sternengasse 7
Mobil  : +41 79 786 81 82      4502 Solothurn
diff --git a/scripts/live b/scripts/live
index 89fcd50..985a5f1 100755
--- a/scripts/live
+++ b/scripts/live
@@ -1411,7 +1411,8 @@ find_livefs ()
 			do
 				if [ "$(cat ${sysblock}/removable)" = "1" ]
 				then
-					if readlink ${sysblock}/device | grep -q usb
+					if readlink ${sysblock} | grep -q usb ||
+					   readlink ${sysblock}/device | grep -q usb # linux < 2.6.28
 					then
 						for dev in $(subdevices "${sysblock}")
 						do

Reply to: