Bug#440235: do_netmount issues
Package: live-initramfs
Severity: normal
Tags: patch
There are some bugs in the do_netmount() function in
/usr/share/initramfs-tools/scripts/live:
The invocation of "ipconfig" appears incorrect; the second argument
"/tmp/net-${DEVICE}.conf" just generates an error at runtime (because
there is no interface matching that name).
Also, the hostname of the system is set to whatever the DHCP server
gave us -- even if it didn't give us a hostname, in which case it's
set to "", which causes errors like "invalid hostname" later in the
boot and Bash will report the hostname as "(none)". Instead,
it should fall back to whatever was specified by the live config.
Here's a patch:
--- live.orig 2007-08-30 16:18:57.000000000 -0400
+++ live 2007-08-30 16:25:57.000000000 -0400
@@ -433,14 +433,16 @@
udevtrigger
udevsettle
- ipconfig ${DEVICE} /tmp/net-${DEVICE}.conf | tee /netboot.config
+ ipconfig ${DEVICE} | tee /netboot.config
if [ "${NFSROOT}" = "auto" ]; then
NFSROOT=${ROOTSERVER}:${ROOTPATH}
fi
# source relevant ipconfig output
+ OLDHOSTNAME=$HOSTNAME
. /tmp/net-${DEVICE}.conf
+ [ -z $HOSTNAME ] && HOSTNAME=$OLDHOSTNAME
export HOSTNAME
if [ -n "${FETCH}" ] && do_httpmount; then
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.20.4 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Reply to: