/usr/share/initramfs-tools/hooks/live is in live-boot-initramfs-tools 3.0.1-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | #!/bin/sh
set -e
. /usr/share/initramfs-tools/hook-functions
[ "${QUIET}" ] || echo -n "live-boot:"
# 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 ]
then
echo
echo "W: live-boot-initramfs-tools (backend) installed without live-boot,"
echo "W: this initramfs will *NOT* have live support."
exit 0
fi
[ "${QUIET}" ] || echo -n " core"
mkdir -p "${DESTDIR}/lib/live"
cp -a /lib/live/boot.sh /lib/live/boot "${DESTDIR}/lib/live"
# klibc dependencies
for FILE in /lib/libacl* /lib/libblkid* /lib/libuuid* /lib/libdevmapper* /lib/libattr*
do
if [ ! -e "${DESTDIR}"/"${FILE}" ] && ls ${FILE} > /dev/null 2>&1
then
cp -a "${FILE}" "${DESTDIR}"/"${FILE}"
fi
done
# udev dependencies
for FILE in /lib/udev/*_id
do
copy_exec "${FILE}"
done
# wheezy/sid
if [ -e /lib/udev/rules.d/60-cdrom_id.rules ]
then
mkdir -p ${DESTDIR}/lib/udev/rules.d
cp -p /lib/udev/rules.d/60-cdrom_id.rules ${DESTDIR}/lib/udev/rules.d
fi
[ "${QUIET}" ] || echo -n " filesystems"
# Configuration: keymap (usefull when using encryption)
if [ -x /bin/loadkeys ] && [ -r /etc/console/boottime.kmap.gz ]
then
copy_exec /bin/loadkeys
mkdir -p "${DESTDIR}"/etc
cp /etc/console/boottime.kmap.gz "${DESTDIR}"/etc
fi
# Configuration: Unique ID
if [ -n "${LIVE_GENERATE_UUID}" ]
then
mkdir -p "${DESTDIR}"/conf
uuidgen -r > "${DESTDIR}"/conf/uuid.conf
fi
# Filesystem: btrfs
manual_add_modules btrfs
# Filesystem: cifs
if [ -x /sbin/mount.cifs ]
then
copy_exec /sbin/mount.cifs
manual_add_modules cifs
fi
# Filesystem: ext3/ext4
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
if [ -x /usr/bin/rsync ]
then
copy_exec /usr/bin/rsync /bin
fi
# Filesystem: squashfs
copy_exec /sbin/losetup
manual_add_modules loop
manual_add_modules squashfs
manual_add_modules sqlzma
manual_add_modules unlzma
# Filesystem: aufs/overlayfs/unionfs
manual_add_modules aufs
manual_add_modules overlayfs
manual_add_modules unionfs
# Filesystem: unionfs-fuse
if [ -x /usr/bin/unionfs-fuse ]
then
copy_exec /usr/bin/unionfs-fuse /bin
fi
# Filesystem: vfat
manual_add_modules nls_cp437
manual_add_modules nls_iso8859-1
manual_add_modules nls_utf8
manual_add_modules vfat
# Filesystem: ntfs
manual_add_modules ntfs
[ "${QUIET}" ] || echo -n " devices"
# Hardware: cdrom
manual_add_modules ide-cd
manual_add_modules ide-generic
manual_add_modules ohci1394
manual_add_modules sbp2
manual_add_modules sr_mod
# Hardware: usb
manual_add_modules sd_mod
# Hardware: network
auto_add_modules net
# Program: eject
if [ -x /usr/bin/eject ]
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
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 ]
then
[ "${QUIET}" ] || echo -n " memdisk"
copy_exec /usr/bin/memdiskfind
manual_add_modules phram
manual_add_modules mtdblock
fi
# Program: udev
if [ -x /sbin/udevadm ]
then
[ "${QUIET}" ] || echo -n " udev"
copy_exec /sbin/udevadm
fi
if [ -x /usr/bin/udevinfo ]
then
[ "${QUIET}" ] || echo -n " udev"
copy_exec /usr/bin/udevinfo /bin
fi
# Program: wget
if [ -x /usr/bin/wget ]
then
[ "${QUIET}" ] || echo -n " wget"
copy_exec /usr/bin/wget /bin
fi
# Program: blockdev
if [ -x /sbin/blockdev ]
then
[ "${QUIET}" ] || echo -n " blockdev"
copy_exec /sbin/blockdev
fi
# FUSE kernel module
manual_add_modules fuse
# FUSE filesystem: httpfs2
if [ -x /usr/bin/httpfs2_ssl ]
then
[ "${QUIET}" ] || echo -n " httpfs:ssl"
copy_exec /usr/bin/httpfs2_ssl /bin/httpfs
elif [ -x /usr/bin/httpfs2 ]
then
[ "${QUIET}" ] || echo -n " httpfs"
copy_exec /usr/bin/httpfs2 /bin/httpfs
fi
# FUSE filesystem: curlftpfs
if [ -x /usr/bin/curlftpfs ]
then
[ "${QUIET}" ] || echo -n " ftpfs"
copy_exec /usr/bin/curlftpfs /bin
fi
# iSCSI
if [ -x /usr/sbin/iscsistart ]
then
[ "${QUIET}" ] || echo -n " iscsi"
copy_exec /usr/sbin/iscsistart /bin
#manual_add_modules ib_iser
manual_add_modules iscsi_tcp
manual_add_modules crc32c
fi
# Some experimental stuff
case "${LIVE_DNS}" in
true)
[ "${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
for _SHLIB in $(find /lib -name 'libnss_dns.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"
;;
esac
[ "${QUIET}" ] || echo .
|