X-Git-Url: http://git.grml.org/?a=blobdiff_plain;ds=sidebyside;f=backends%2Finitramfs-tools%2Flive.hook;h=1814211655a940269da25f76f6ed87a49a4b6bc2;hb=eae42969c6f684a71e2aa812eaa449f3e64a33fc;hp=78aae2e86c64c829dfd779e0b34b5e3fd91c977e;hpb=7167a10dbac0c76b3ae0fd70b8188e57293429f3;p=live-boot-grml.git diff --git a/backends/initramfs-tools/live.hook b/backends/initramfs-tools/live.hook index 78aae2e..1814211 100755 --- a/backends/initramfs-tools/live.hook +++ b/backends/initramfs-tools/live.hook @@ -6,19 +6,15 @@ set -e [ "${QUIET}" ] || echo -n "live-boot:" -# Reading configuration files -if [ -e /etc/live/boot.conf ] -then - . /etc/live/boot.conf -fi - -if ls /etc/live/boot.d/*.conf > /dev/null 2>&1 -then - for _FILE in /etc/live/boot.d/*.conf - do - . ${_FILE} - done -fi +# Reading configuration file from filesystem and live-media +for _FILE in /etc/live/boot.conf /etc/live/boot/* \ + /lib/live/mount/media/live/boot.conf /lib/live/mount/media/live/boot/* +do + if [ -e "${_FILE}" ] + then + . "${_FILE}" + fi +done # Checking live-boot if [ ! -e /lib/live/boot ] @@ -46,14 +42,9 @@ done # udev dependencies for FILE in /lib/udev/*_id do - if [ ! -e "${DESTDIR}/${FILE}" ] - then - mkdir -p "${DESTDIR}/lib/udev" - copy_exec "${FILE}" /lib/udev - fi + copy_exec "${FILE}" done -# wheezy/sid if [ -e /lib/udev/rules.d/60-cdrom_id.rules ] then mkdir -p ${DESTDIR}/lib/udev/rules.d @@ -65,7 +56,7 @@ fi # Configuration: keymap (usefull when using encryption) if [ -x /bin/loadkeys ] && [ -r /etc/console/boottime.kmap.gz ] then - copy_exec /bin/loadkeys /bin + copy_exec /bin/loadkeys mkdir -p "${DESTDIR}"/etc cp /etc/console/boottime.kmap.gz "${DESTDIR}"/etc @@ -84,7 +75,7 @@ manual_add_modules btrfs # Filesystem: cifs if [ -x /sbin/mount.cifs ] then - copy_exec /sbin/mount.cifs /sbin + copy_exec /sbin/mount.cifs manual_add_modules cifs fi @@ -92,6 +83,10 @@ fi manual_add_modules ext3 manual_add_modules ext4 +# Filesystem: hfs/hfsplus +manual_add_modules hfs +manual_add_modules hfsplus + # Filesystem: jffs2 manual_add_modules jffs2 @@ -101,7 +96,7 @@ then fi # Filesystem: squashfs -copy_exec /sbin/losetup /sbin +copy_exec /sbin/losetup manual_add_modules loop manual_add_modules squashfs manual_add_modules sqlzma @@ -147,11 +142,19 @@ 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 -copy_exec /usr/bin/sha256sum /bin -copy_exec /usr/bin/md5sum /bin +if [ -e /etc/progress-linux_version ] +then + copy_exec /usr/bin/sha256sum /bin +else + copy_exec /usr/bin/md5sum /bin +fi # Program: memdisk if [ -x /usr/bin/memdiskfind ] @@ -166,12 +169,7 @@ fi if [ -x /sbin/udevadm ] then [ "${QUIET}" ] || echo -n " udev" - copy_exec /sbin/udevadm /sbin -fi -if [ -x /usr/bin/udevinfo ] -then - [ "${QUIET}" ] || echo -n " udev" - copy_exec /usr/bin/udevinfo /bin + copy_exec /sbin/udevadm fi # Program: wget @@ -185,7 +183,7 @@ fi if [ -x /sbin/blockdev ] then [ "${QUIET}" ] || echo -n " blockdev" - copy_exec /sbin/blockdev /sbin + copy_exec /sbin/blockdev fi # FUSE kernel module @@ -225,23 +223,18 @@ case "${LIVE_DNS}" in true) [ "${QUIET}" ] || echo -n " dns" - #copy_exec /lib/libnss_files.so.* /lib # /etc/hosts and /etc/passwd - copy_exec /lib/libnss_dns.so.* /lib # DNS server - #copy_exec /lib/libnss_compat.so.* /lib # /etc/passwd + # /lib/libnss_dns.so.*:a DNS + # /lib/libnss_files.so.*: /etc/hosts and /etc/passwd + # /lib/libnss_compat.so.*: /etc/passwd - # Configuration file - may be needed if /etc/hosts is used. - #mkdir -p $DESTDIR/etc - #cp -p /etc/nsswitch.conf $DESTDIR/etc - ;; -esac - -case "${LIVE_UNIONMOUNT}" in - true) - [ "${QUIET}" ] || echo -n " unionmount" + for _SHLIB in $(find /lib -name 'libnss_dns.so.*') + do + copy_exec "${_SHLIB}" + done - # UnionMount - # only mount from patched util-linux can do this currently - copy_exec /bin/mount /bin/mount_full + # might be needed if /etc/hosts is used + #mkdir -p "${DESTDIR}/etc" + #cp -p /etc/nsswitch.conf "${DESTDIR}/etc" ;; esac