From: Michael Prokop Date: Sun, 13 May 2012 15:57:10 +0000 (+0200) Subject: debnet: Ignore loop devices X-Git-Tag: v0.5.4~2 X-Git-Url: http://git.grml.org/?p=grml-network.git;a=commitdiff_plain;h=80d07bb5f7b87a990da936f1c3857991187fd709 debnet: Ignore loop devices Quoting from http://bts.grml.org/grml/issue1166: | I booted using the options lvm debnet, expecting debnet to use the | /etc/network/interfaces file from the LVM logical volume. Instead, it | used the /etc/network/interfaces file from /dev/loop0, because that is | listed earlier in /proc/partitions. Thanks: John S. Skogtvedt for bugreport and patch --- diff --git a/sbin/debnet b/sbin/debnet index 683b475..e1e811f 100755 --- a/sbin/debnet +++ b/sbin/debnet @@ -16,7 +16,7 @@ if [ "$1" = "-h" -o "$1" = "--help" ] ; then exit 0 fi -DEVICES="$(< /proc/partitions tail -n +3 | awk '{print "/dev/"$4}' | tr "\n" " ")" +DEVICES="$(< /proc/partitions tail -n +3 | awk '($4 !~ /loop[0-9]+/) {print "/dev/"$4}' | tr "\n" " ")" DEVICES="$DEVICES $(ls /dev/mapper/*)" FOUND_DEBNET=""