X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=hooks%2Flive;h=b5d43f266356c7dc58959d0bf3da9ec6eca53d2a;hb=2e09ee3e58cd15af47149e7c9d86baa9890526b0;hp=645b168d917d79e06af3501fc4c9c4caf8a47e06;hpb=6fc8f78d026b31f4f4a3ee6507d726ddc37adbc8;p=live-boot-grml.git diff --git a/hooks/live b/hooks/live index 645b168..b5d43f2 100755 --- a/hooks/live +++ b/hooks/live @@ -24,20 +24,29 @@ esac # live-boot hook +# Reading configuration file from filesystem +if [ -e /etc/live/boot.conf ] +then + . /etc/live/boot.conf +fi + +if ls /etc/live/boot.d/* > /dev/null 2>&1 +then + for _FILE in /etc/live/boot.d/* + do + . ${_FILE} + done +fi + # Handling live-boot # Configuration -if [ -r /etc/live.conf ] +if [ -e /usr/share/live-boot/languagelist ] then - . /etc/live.conf - - mkdir -p "${DESTDIR}"/etc - cp /etc/live.conf "${DESTDIR}"/etc + mkdir -p "${DESTDIR}"/usr/share/live-boot + cp /usr/share/live-boot/languagelist "${DESTDIR}"/usr/share/live-boot fi -mkdir -p "${DESTDIR}"/usr/share/live-boot -cp /usr/share/live-boot/languagelist "${DESTDIR}"/usr/share/live-boot - # Directories mkdir -p "${DESTDIR}"/lib/live-boot @@ -52,7 +61,7 @@ cp /usr/share/initramfs-tools/scripts/live-helpers "${DESTDIR}"/scripts # klibc dependencies for FILE in /lib/libacl* /lib/libblkid* /lib/libuuid* /lib/libdevmapper* /lib/libattr* do - if [ ! -e "${DESTDIR}"/"${FILE}" ] + if [ ! -e "${DESTDIR}"/"${FILE}" ] && ls ${FILE} > /dev/null 2>&1 then cp -a "${FILE}" "${DESTDIR}"/"${FILE}" fi @@ -92,6 +101,9 @@ then uuidgen -r > "${DESTDIR}"/conf/uuid.conf fi +# Filesystem: btrfs +manual_add_modules btrfs + # Filesystem: cifs if [ -x /sbin/mount.cifs ] then @@ -159,6 +171,13 @@ fi # Program: md5sum copy_exec /usr/bin/md5sum /bin +# Program: memdisk +if [ -x /usr/bin/memdiskfind ] +then + copy_exec /usr/bin/memdiskfind + manual_add_modules phram mtdblock +fi + # Program: cpio # busybox and klibc lacks --no-absolute-filenames and --sparse, needed for snapshots if [ -e "${DESTDIR}/bin/cpio" ] @@ -212,3 +231,30 @@ if [ -x /usr/bin/curlftpfs ] then copy_exec /usr/bin/curlftpfs /bin fi + +# iSCSI +if [ -x /usr/sbin/iscsistart ] +then + copy_exec /usr/sbin/iscsistart /bin + #manual_add_modules ib_iser + manual_add_modules iscsi_tcp + manual_add_modules crc32c +fi + +if [ "${LIVE_DNS}" = "true" ] +then + #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 + + # Configuration file - may be needed if /etc/hosts is used. + #mkdir -p $DESTDIR/etc + #cp -p /etc/nsswitch.conf $DESTDIR/etc +fi + +if [ "${LIVE_UNIONMOUNT}" = "true" ] +then + # UnionMount + # only mount from patched util-linux can do this currently + copy_exec /bin/mount /bin/mount_full +fi