3 # initramfs hook for live-boot (Debian Live)
7 # initramfs-tools header
23 .
/usr
/share
/initramfs-tools
/hook-functions
30 if [ -r /etc
/live.conf
]
34 mkdir
-p "${DESTDIR}"/etc
35 cp /etc
/live.conf
"${DESTDIR}"/etc
38 mkdir
-p "${DESTDIR}"/usr
/share
/live-boot
39 cp /usr
/share
/live-boot
/languagelist
"${DESTDIR}"/usr
/share
/live-boot
42 mkdir
-p "${DESTDIR}"/lib
/live-boot
45 copy_exec
/usr
/share
/live-boot
/live-reconfigure
/bin
46 copy_exec
/usr
/share
/live-boot
/live-preseed
/bin
49 cp /usr
/share
/initramfs-tools
/scripts
/live-functions
"${DESTDIR}"/scripts
50 cp /usr
/share
/initramfs-tools
/scripts
/live-helpers
"${DESTDIR}"/scripts
53 for FILE
in /lib
/libacl
* /lib
/libblkid
* /lib
/libuuid
* /lib
/libdevmapper
* /lib
/libattr
*
55 if [ ! -e "${DESTDIR}"/"${FILE}" ]
57 cp -a "${FILE}" "${DESTDIR}"/"${FILE}"
61 # udev dependencies (squeeze and newer)
62 for FILE
in /lib
/udev
/*_id
64 if [ ! -e "${DESTDIR}/${FILE}" ]
66 mkdir
-p "${DESTDIR}/lib/udev"
67 copy_exec
"${FILE}" /lib
/udev
71 if [ -e /lib
/udev
/rules.d
/60-cdrom_id.rules
]
73 mkdir
-p ${DESTDIR}/lib
/udev
/rules.d
74 cp -p /lib
/udev
/rules.d
/60-cdrom_id.rules
${DESTDIR}/lib
/udev
/rules.d
77 # Handling other stuff
79 # Configuration: keymap (usefull when using encryption)
80 if [ -x /bin
/loadkeys
] && [ -r /etc
/console
/boottime.kmap.gz
]
82 copy_exec
/bin
/loadkeys
/bin
84 mkdir
-p "${DESTDIR}"/etc
85 cp /etc
/console
/boottime.kmap.gz
"${DESTDIR}"/etc
88 # Configuration: Unique ID
89 if [ -n "${LIVE_GENERATE_UUID}" ]
91 mkdir
-p "${DESTDIR}"/conf
92 uuidgen
-r > "${DESTDIR}"/conf
/uuid.conf
96 if [ -x /sbin
/mount.cifs
]
98 copy_exec
/sbin
/mount.cifs
/sbin
99 manual_add_modules cifs
102 # Filesystem: ext3/ext4
103 manual_add_modules ext3
104 manual_add_modules ext4
107 manual_add_modules jffs2
109 if [ -x /usr
/bin
/rsync
]
111 copy_exec
/usr
/bin
/rsync
/bin
114 # Filesystem: squashfs
115 copy_exec
/sbin
/losetup
/sbin
116 manual_add_modules loop
117 manual_add_modules squashfs
118 manual_add_modules sqlzma
119 manual_add_modules unlzma
121 # Filesystem: aufs/unionfs
122 manual_add_modules aufs
123 manual_add_modules unionfs
125 # Filesystem: unionfs-fuse
126 if [ -x /usr
/bin
/unionfs-fuse
]
128 copy_exec
/usr
/bin
/unionfs-fuse
/bin
132 manual_add_modules nls_cp437
133 manual_add_modules nls_iso8859-1
134 manual_add_modules nls_utf8
135 manual_add_modules vfat
138 manual_add_modules ntfs
141 manual_add_modules ide-cd
142 manual_add_modules ide-generic
143 manual_add_modules ohci1394
144 manual_add_modules sbp2
145 manual_add_modules sr_mod
148 manual_add_modules sd_mod
154 if [ -x /usr
/bin
/eject
]
156 copy_exec
/usr
/bin
/eject
/bin
160 copy_exec
/usr
/bin
/md5sum /bin
163 # busybox and klibc lacks --no-absolute-filenames and --sparse, needed for snapshots
164 if [ -e "${DESTDIR}/bin/cpio" ]
166 # Override already present cpio's, mostly klibc's
167 rm "${DESTDIR}/bin/cpio"
169 copy_exec
/bin
/cpio /bin
172 if [ -x /sbin
/udevadm
]
175 copy_exec
/sbin
/udevadm
/sbin
178 copy_exec
/sbin
/udevtrigger
/sbin
179 copy_exec
/sbin
/udevsettle
/sbin
181 if [ -x /usr
/bin
/udevinfo
]
183 copy_exec
/usr
/bin
/udevinfo
/bin
187 if [ -x /usr
/bin
/wget
]
189 copy_exec
/usr
/bin
/wget
/bin
193 if [ -x /sbin
/blockdev
]
195 copy_exec
/sbin
/blockdev
/sbin
199 manual_add_modules fuse
201 # FUSE filesystem: httpfs2
202 if [ -x /usr
/bin
/httpfs2_ssl
]
204 copy_exec
/usr
/bin
/httpfs2_ssl
/bin
/httpfs
205 elif [ -x /usr
/bin
/httpfs2
]
207 copy_exec
/usr
/bin
/httpfs2
/bin
/httpfs
210 # FUSE filesystem: curlftpfs
211 if [ -x /usr
/bin
/curlftpfs
]
213 copy_exec
/usr
/bin
/curlftpfs
/bin