]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
installer: skip empty blockdevices.
authorArne Fitzenreiter <arne_f@ipfire.org>
Wed, 31 Oct 2012 19:58:51 +0000 (20:58 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Wed, 31 Oct 2012 19:58:51 +0000 (20:58 +0100)
src/install+setup/install/mountdest.sh

index 776962a2893da0a5a182a5792a2ca71749f6b36d..ccee6913c8ee7b6ea223658ab00ed9ef5880e9c1 100644 (file)
@@ -95,6 +95,11 @@ for path in /sys/block/*; do
                continue
        fi
 
                continue
        fi
 
+       if [ $(cat /sys/block/${device}/size) == 0 ]; then
+               echo "  is empty - skipping"
+               continue
+       fi
+
        # Found it.
        echo "  OK, this is it..."
        echo -n "${device}" > /tmp/dest_device
        # Found it.
        echo "  OK, this is it..."
        echo -n "${device}" > /tmp/dest_device