Merge remote-tracking branch 'upstream/master'
[live-boot-grml.git] / backend / initramfs-tools / live.hook
index 5970e7d..ef148b6 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
@@ -240,13 +246,22 @@ fi
 # /lib/libnss_files.so.*:  /etc/hosts and /etc/passwd
 # /lib/libnss_compat.so.*: /etc/passwd
 
-for _SHLIB in $(find /lib -name 'libnss_dns.so.*')
+for _SHLIB in $(find /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
 
 [ "${QUIET}" ] || echo .