2011-10-24 02:24:18 +02:00
|
|
|
run_hook ()
|
|
|
|
{
|
|
|
|
msg -n ":: Creating shutdown ramfs..."
|
|
|
|
|
2012-02-23 03:52:06 +01:00
|
|
|
for _dir in bin lib sbin usr/bin usr/lib usr/sbin; do
|
|
|
|
mkdir -p /run/initramfs/${_dir}
|
|
|
|
done
|
2011-10-24 02:24:18 +02:00
|
|
|
cp /bin/busybox /run/initramfs/bin/
|
|
|
|
cp /lib/ld-* /run/initramfs/lib/
|
|
|
|
cp /lib/lib* /run/initramfs/lib/
|
2012-02-23 03:52:06 +01:00
|
|
|
cp /usr/lib/lib* /run/initramfs/usr/lib/
|
2011-10-24 02:24:18 +02:00
|
|
|
cp /sbin/dmsetup /run/initramfs/sbin/
|
2012-02-23 03:52:06 +01:00
|
|
|
cp /sbin/losetup /run/initramfs/sbin/
|
2011-10-24 02:24:18 +02:00
|
|
|
if [[ -x /bin/nbd-client ]]; then
|
|
|
|
cp /bin/nbd-client /run/initramfs/bin/
|
|
|
|
fi
|
|
|
|
|
|
|
|
chroot /run/initramfs /bin/busybox --install
|
|
|
|
cp /shutdown /run/initramfs/
|
|
|
|
|
|
|
|
msg "done."
|
|
|
|
}
|