BTS

Issue1166

Title Patch for debnet (grml-network)
Priority bug Status resolved
Superseder Nosy List jss, mika
Assigned To mika Topics

Created on 2012-05-11.12:32:17 by jss, last changed 2012-05-14.13:53:05 by mika.

Files
File name Uploaded Type Edit Remove
debnet.patch jss, 2012-05-11.12:32:17 text/x-patch
Messages
msg4352 (view) Author: mika Date: 2012-05-14.13:53:05
grml-network v0.5.4 has been uploaded, closing the reported issues.
msg4349 (view) Author: mika Date: 2012-05-13.16:12:22
* John S. Skogtvedt wrote in grml's BTS on 20120511 / 14:32:

> I found the following problems when trying to use debnet on grml 2011.12
> on a virtual machine with Debian Squeeze installed on LVM.

> 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.

> In addition, I found the two following problems in debnet:
> * DEVICES="$DEVICES $(ls /dev/mapper/*)" is redundant, because LVM
> logical volumes are listed in /proc/partitions (but perhaps the line is
> needed for other cases?)
> * "pump -k >/dev/null 2>&1" causes the script to always exit, because
> pump is not installed, and the shebang line includes the -e option to sh.

> I've attached a patch which removes the two mentioned lines and causes
> the script to ignore all loop devices. I've tested it and it seems to
> work for me: the /etc/network/interfaces file is successfully copied
> from the LVM logical volume, and the network is brought up.

Excellent catch, thanks for the bugreport and your patch!

I'm not sure whether anyone is using /dev/mapper/* outside of LVM
(as there *are* usecases for that), so I decided to be safe and kept
the line mentioning /dev/mapper/. The rest got applied and pushed,
will be released soon.

Thanks!

regards,
-mika-
msg4347 (view) Author: jss Date: 2012-05-11.12:32:17
Hello,

I found the following problems when trying to use debnet on grml 2011.12
on a virtual machine with Debian Squeeze installed on LVM.

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.

In addition, I found the two following problems in debnet:
* DEVICES="$DEVICES $(ls /dev/mapper/*)" is redundant, because LVM
logical volumes are listed in /proc/partitions (but perhaps the line is
needed for other cases?)
* "pump -k >/dev/null 2>&1" causes the script to always exit, because
pump is not installed, and the shebang line includes the -e option to sh.

I've attached a patch which removes the two mentioned lines and causes
the script to ignore all loop devices. I've tested it and it seems to
work for me: the /etc/network/interfaces file is successfully copied
from the LVM logical volume, and the network is brought up.

John.
History
Date User Action Args
2012-05-14 13:53:05mikasetstatus: fixed-in-git -> resolved
nosy: mika, jss
messages: + msg4352
2012-05-13 16:26:03mikasetstatus: chatting -> fixed-in-git
priority: bug
nosy: + mika
assignedto: mika
2012-05-13 16:12:23mikasetstatus: unread -> chatting
messages: + msg4349
2012-05-11 12:32:17jsscreate