Include ethtool binary for debugging network configuration during network boot
[live-boot-grml.git] / backend / initramfs-tools / live.hook
index 8be2335..4039345 100755 (executable)
@@ -16,6 +16,12 @@ do
        fi
 done
 
+# Grml version information:
+if [ -r /etc/grml_version ]
+then
+       cp /etc/grml_version "${DESTDIR}"/etc
+fi
+
 # Checking live-boot
 if [ ! -e /bin/live-boot ]
 then
@@ -53,7 +59,7 @@ do
 done
 
 # udev dependencies
-if [ "${MINIMAL:-}" != "y" ]
+if [ "${MINIMAL:-}" != "true" ] &&  [ "${MINIMAL:-}" != "yes" ]
 then
        for FILE in /lib/udev/*_id
        do
@@ -61,7 +67,8 @@ then
        done
 fi
 
-if [ -e /lib/udev/rules.d/60-cdrom_id.rules ] && [ "${DISABLE_CDROM:-}" != "y" ]
+if [ -e /lib/udev/rules.d/60-cdrom_id.rules ] && [ "${DISABLE_CDROM:-}" != "true" ] && \
+       [ "${DISABLE_CDROM:-}" != "yes" ]
 then
        mkdir -p "${DESTDIR}/lib/udev/rules.d"
        cp -p /lib/udev/rules.d/60-cdrom_id.rules "${DESTDIR}/lib/udev/rules.d"
@@ -106,7 +113,7 @@ manual_add_modules hfsplus
 # Filesystem: jffs2
 manual_add_modules jffs2
 
-if [ -x /usr/bin/rsync ] && [ "${MINIMAL:-}" != "y" ]
+if [ -x /usr/bin/rsync ] && [ "${MINIMAL:-}" != "true" ] && [ "${MINIMAL:-}" != "yes" ]
 then
        copy_exec /usr/bin/rsync /bin
 fi
@@ -123,7 +130,7 @@ manual_add_modules aufs
 manual_add_modules overlay
 
 # Filesystem: vfat
-if [ "${DISABLE_FAT:-}" != "y" ]
+if [ "${DISABLE_FAT:-}" != "true" ] &&  [ "${DISABLE_FAT:-}" != "yes" ]
 then
        manual_add_modules nls_cp437
        manual_add_modules nls_iso8859-1
@@ -133,14 +140,14 @@ then
 fi
 
 # Filesystem: ntfs
-if [ "${DISABLE_NTFS:-}" != "y" ]
+if [ "${DISABLE_NTFS:-}" != "true" ] && [ "${DISABLE_NTFS:-}" != "yes" ]
 then
        manual_add_modules ntfs
 fi
 
 [ "${QUIET}" ] || echo -n " devices"
 # Hardware: cdrom
-if [ "${DISABLE_CDROM:-}" != "y" ]
+if [ "${DISABLE_CDROM:-}" != "true" ] && [ "${DISABLE_CDROM:-}" != "yes" ]
 then
        manual_add_modules ide-cd
        manual_add_modules ide-generic
@@ -150,7 +157,7 @@ then
 fi
 
 # Hardware: usb
-if [ "${DISABLE_USB:-}" != "y" ]
+if [ "${DISABLE_USB:-}" != "true" ] && [ "${DISABLE_USB:-}" != "yes" ]
 then
        manual_add_modules sd_mod
 fi
@@ -164,10 +171,6 @@ then
        copy_exec /usr/bin/eject /bin
 fi
 
-# Program: mount
-# fuse does not work with klibc mount
-copy_exec /bin/mount /bin/mount.util-linux
-
 [ "${QUIET}" ] || echo -n " utils"
 
 # Feature: Verify Checksums
@@ -202,7 +205,7 @@ then
 fi
 
 # FUSE kernel module
-if [ "${DISABLE_FUSE:-n}" != "y" ]
+if [ "${DISABLE_FUSE:-n}" != "true" ] && [ "${DISABLE_FUSE:-n}" != "yes" ]
 then
        manual_add_modules fuse
 
@@ -239,17 +242,31 @@ fi
 
 [ "${QUIET}" ] || echo -n " dns"
 
-# /lib/libnss_dns.so.*:a   DNS
-# /lib/libnss_files.so.*:  /etc/hosts and /etc/passwd
-# /lib/libnss_compat.so.*: /etc/passwd
+# libnss_dns.so.*:    DNS
+# libnss_files.so.*:  /etc/hosts and /etc/passwd
+# libnss_compat.so.*: /etc/passwd
 
-for _SHLIB in $(find /lib -name 'libnss_dns.so.*')
+for _SHLIB in $(find /lib /usr/lib -name 'libnss_dns.so.*' -o -name 'libnss_files.so.*')
 do
        copy_exec "${_SHLIB}"
 done
 
-# might be needed if /etc/hosts is used
-#mkdir -p "${DESTDIR}/etc"
-#cp -p /etc/nsswitch.conf "${DESTDIR}/etc"
+if [ ! -e "${DESTDIR}/etc/nsswitch.conf" ]
+then
+       # Needed to make "hostname -f" honor the domainname provided by DHCP
+       echo "hosts: files dns" > "${DESTDIR}/etc/nsswitch.conf"
+fi
+
+# vlan support
+if [ -x /sbin/vconfig ]
+then
+       copy_exec /sbin/vconfig
+       manual_add_modules 8021q
+fi
+
+if [ -x /sbin/ethtool ]
+then
+       copy_exec /sbin/ethtool
+fi
 
 [ "${QUIET}" ] || echo .