Package: fai-client Version: 3.4.8 Severity: normal
I recently discovered that booting machines with multiple NICs would periodically result in a hang during the boot process. Some digging through the live-boot-initramfs-tools (2.0.15-1) scripts (specifically /usr/share/initramfs-tools/scripts/live-premount/select_eth_device) informed me that I could skip the auto-detection of the which interface was alive and usable by adding the following to my pxe kernel's boot line: "live-netdev=eth0 ip=eth0:dhcp" (instead of just "ip=dhcp"). However, now this results in a bash error since you can't export variables with a dash in them. For example:
Kernel currently running: Linux 2.6.38-grml64 x86_64 GNU/Linux Kernel parameters: initrd=initrd.img-2.6.38-grml64 live-netdev=eth0 ip=eth0:dhcp root=/dev/nfs nfsroot=10.12.12.92:/install/fai/nfsroot/amd64/squeeze boot=live FAI_FLAGS=sshd,verbose FAI_ACTION=sysinfo -- squeeze amd64_squeeze squeeze_amd64 BOOT_IMAGE=vmlinuz-2.6.38-grml64
/usr/lib/fai/subroutines: line 674: export: `live-netdev=eth0': not a valid identifierI'm guessing the simple fix to this is to just sed those variable names from - to _. Something like this:
--- /install/fai/nfsroot/i386/squeeze/live/filesystem.dir//usr/lib/fai/subroutines 2011-05-10 11:38:00.000000000 -0500 +++ /install/fai/nfsroot/amd64/squeeze/live/filesystem.dir//usr/lib/fai/subroutines 2011-07-01 11:21:11.000000000 -0500 @@ -671,7 +671,10 @@ ;;[a-zA-Z]*=*)
- eval "export $word" + #eval "export $word" + key=`echo "$word" | sed -r -e 's/^([^=]+)=.*/\1/' -e 's/-/_/g'` + value=`echo "$word" | sed -r -e 's/^[^=]+=(.*)/\1/'` + eval "export $key=$value" ;; esac done Thanks, Brian -- System Information: Debian Release: 6.0.1 APT prefers stable APT policy: (500, 'stable'), (110, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.38-grml64 (SMP w/1 CPU core; PREEMPT) Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) Shell: /bin/sh linked to /bin/dash Versions of packages fai-client depends on: ii file 5.04-5 Determines file type using "magic" ii iproute 20100519-3 networking and traffic control too ii libapt-pkg-perl 0.1.24+b1 Perl interface to libapt-pkgii perl 5.10.1-17 Larry Wall's Practical Extraction
Versions of packages fai-client recommends: ii cfengine2 2.2.10-2 Tool for configuring and maintaini ii debconf-utils 1.5.36.1 debconf utilities fai-client suggests no packages. -- Configuration Files: /etc/fai/fai.conf changed [not included] -- no debconf information
signature.asc
Description: Digital signature