[Fai-commit] r4340 - trunk/lib
lange at alioth.debian.org
lange at alioth.debian.org
Wed Jun 13 17:56:03 UTC 2007
Author: lange
Date: 2007-06-13 17:56:03 +0000 (Wed, 13 Jun 2007)
New Revision: 4340
Modified:
trunk/lib/disk-info
Log:
do not include removable devices into list of disks
Modified: trunk/lib/disk-info
===================================================================
--- trunk/lib/disk-info 2007-06-13 16:34:37 UTC (rev 4339)
+++ trunk/lib/disk-info 2007-06-13 17:56:03 UTC (rev 4340)
@@ -14,9 +14,12 @@
isdisk=1
# skip ide cdrom
[ -f /proc/ide/$device/media ] && grep -q cdrom /proc/ide/$device/media && isdisk=0
+ [ `cat /sys/block/$device/removable` -eq 1 ] && isdisk=0
[ $isdisk -eq 1 ] && echo "$device $blocks"
done
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# echo a space separated list of devices and their block size
egrep ' cciss/c.d.\b| ida/c.d.\b| rd/c.d.\b| hd.\b| sd.\b|/disc\b' /proc/partitions | diskandsize
+
+
More information about the Fai-commit
mailing list