SOURCES: util-linux-blockdev.init - check if /dev/drive exists

arekm arekm at pld-linux.org
Wed Jan 18 20:53:29 CET 2006


Author: arekm                        Date: Wed Jan 18 19:53:29 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- check if /dev/drive exists

---- Files affected:
SOURCES:
   util-linux-blockdev.init (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: SOURCES/util-linux-blockdev.init
diff -u SOURCES/util-linux-blockdev.init:1.3 SOURCES/util-linux-blockdev.init:1.4
--- SOURCES/util-linux-blockdev.init:1.3	Thu Dec  8 02:02:49 2005
+++ SOURCES/util-linux-blockdev.init	Wed Jan 18 20:53:24 2006
@@ -23,7 +23,7 @@
 	if [ ! -f /var/lock/subsys/blockdev ]; then
 
 		for drive in $(ls /sys/block 2> /dev/null); do
-			if [ -d "/sys/block/${drive}" ]; then
+			if [ -d "/sys/block/${drive}" -a -e "/dev/${drive}" ]; then
 				eval PARAMS=\$BLOCKDEV_${drive}
 				if [ -n "${PARAMS}" ]; then
 					show "Setting parameters for block drive %s (%s)" "$drive" "$PARAMS"
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/util-linux-blockdev.init?r1=1.3&r2=1.4&f=u



More information about the pld-cvs-commit mailing list