extrahd: add support for mdadm devices.
authorArne Fitzenreiter <arne_f@ipfire.org>
Sun, 17 Apr 2011 16:09:28 +0000 (18:09 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 17 Apr 2011 16:09:28 +0000 (18:09 +0200)
remove wrong devline of some usb-keys.

src/scripts/scanhd

index 2d76ba6..9d47e3d 100644 (file)
@@ -2,7 +2,10 @@
 
 case "$1" in
        ide)
-               /sbin/kudzu -qps -c HD | egrep "desc|device:" | awk -F': ' '{print $2}' | sed -e '/"$/a\\' -e "s/$/\;/g" | tr "\n" "XX" | sed -e "s/XX/\n/g" -e "s/\;X/\;/g" > /var/ipfire/extrahd/scan
+               /sbin/kudzu -qps -c HD | egrep "desc|device:" | awk -F': ' '{print $2}' | sed -e '/"$/a\\' -e "s/$/\;/g" | tr "\n" "XX" | sed -e "s/XX/\n/g" -e "s/\;X/\;/g" | grep '^"' -v > /var/ipfire/extrahd/scan
+               if [ -e /dev/md ]; then
+                       echo 'md;"MDADM software-raid";' >> /var/ipfire/extrahd/scan
+               fi
                ;;
        partitions)
                cat /proc/partitions | awk '{print $4 " " $3 }' | grep -v name | grep -v "^[:space:]*$" | \