3 # initramfs hook for live-initramfs (Debian Live)
7 # initramfs-tools header
23 .
/usr
/share
/initramfs-tools
/hook-functions
27 # Handling live-initramfs
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-initramfs
39 cp /usr
/share
/live-initramfs
/languagelist
"${DESTDIR}"/usr
/share
/live-initramfs
42 mkdir
-p "${DESTDIR}"/lib
/live-initramfs
45 copy_exec
/usr
/share
/live-initramfs
/live-reconfigure
/bin
46 copy_exec
/usr
/share
/live-initramfs
/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 # Handling other stuff
73 # Configuration: keymap (usefull when using encryption)
74 if [ -x /bin
/loadkeys
] && [ -r /etc
/console
/boottime.kmap.gz
]
76 copy_exec
/bin
/loadkeys
/bin
78 mkdir
-p "${DESTDIR}"/etc
79 cp /etc
/console
/boottime.kmap.gz
"${DESTDIR}"/etc
82 # Configuration: Unique ID
83 if [ -n "${LIVE_GENERATE_UUID}" ]
85 mkdir
-p "${DESTDIR}"/conf
86 uuidgen
-r > "${DESTDIR}"/conf
/uuid.conf
90 if [ -x /sbin
/mount.cifs
]
92 copy_exec
/sbin
/mount.cifs
/sbin
93 manual_add_modules cifs
96 # Filesystem: ext3/ext4
97 manual_add_modules ext3
98 manual_add_modules ext4
101 manual_add_modules jffs2
103 if [ -x /usr
/bin
/rsync
]
105 copy_exec
/usr
/bin
/rsync
/bin
108 # Filesystem: squashfs
109 copy_exec
/sbin
/losetup
/sbin
110 manual_add_modules loop
111 manual_add_modules squashfs
112 manual_add_modules sqlzma
113 manual_add_modules unlzma
115 # Filesystem: aufs/unionfs
116 manual_add_modules aufs
117 manual_add_modules unionfs
119 # Filesystem: unionfs-fuse
120 if [ -x /usr
/bin
/unionfs-fuse
]
122 copy_exec
/usr
/bin
/unionfs-fuse
/bin
126 manual_add_modules nls_cp437
127 manual_add_modules nls_iso8859-1
128 manual_add_modules nls_utf8
129 manual_add_modules vfat
132 manual_add_modules ntfs
135 manual_add_modules ide-cd
136 manual_add_modules ide-generic
137 manual_add_modules ohci1394
138 manual_add_modules sbp2
139 manual_add_modules sr_mod
142 manual_add_modules sd_mod
148 if [ -x /usr
/bin
/eject
]
150 copy_exec
/usr
/bin
/eject
/bin
154 copy_exec
/usr
/bin
/md5sum /bin
157 # busybox and klibc lacks --no-absolute-filenames and --sparse, needed for snapshots
158 if [ -e "${DESTDIR}/bin/cpio" ]
160 # Override already present cpio's, mostly klibc's
161 rm "${DESTDIR}/bin/cpio"
163 copy_exec
/bin
/cpio /bin
166 if [ -x /sbin
/udevadm
]
169 copy_exec
/sbin
/udevadm
/sbin
172 copy_exec
/sbin
/udevtrigger
/sbin
173 copy_exec
/sbin
/udevsettle
/sbin
175 if [ -x /usr
/bin
/udevinfo
]
177 copy_exec
/usr
/bin
/udevinfo
/bin
181 if [ -x /usr
/bin
/wget
]
183 copy_exec
/usr
/bin
/wget
/bin
187 if [ -x /sbin
/blockdev
]
189 copy_exec
/sbin
/blockdev
/sbin
193 manual_add_modules fuse
195 # FUSE filesystem: httpfs2
196 if [ -x /usr
/bin
/httpfs2_ssl
]
198 copy_exec
/usr
/bin
/httpfs2_ssl
/bin
/httpfs
199 elif [ -x /usr
/bin
/httpfs2
]
201 copy_exec
/usr
/bin
/httpfs2
/bin
/httpfs
204 # FUSE filesystem: curlftpfs
205 if [ -x /usr
/bin
/curlftpfs
]
207 copy_exec
/usr
/bin
/curlftpfs
/bin