From 80d07bb5f7b87a990da936f1c3857991187fd709 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Sun, 13 May 2012 17:57:10 +0200 Subject: [PATCH] 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 --- sbin/debnet | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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="" -- 2.1.4