systemd/debian/extra/initramfs-tools/scripts/init-bottom/udev
Martin Pitt 2a2e638e94 debian/extra/initramfs-tools/scripts/init-bottom/udev: Prefer "nuke" again
This command comes from klibc-utils, not from initramfs-tools. But fall back to
"rm" if it does not exist.
2016-01-21 09:53:13 +01:00

28 lines
467 B
Bash
Executable File

#!/bin/sh -e
PREREQS=""
prereqs() { echo "$PREREQS"; }
case "$1" in
prereqs)
prereqs
exit 0
;;
esac
# Stop udevd, we'll miss a few events while we run init, but we catch up
udevadm control --exit
# move the /dev tmpfs to the rootfs
mount -n -o move /dev ${rootmnt}/dev
# create a temporary symlink to the final /dev for other initramfs scripts
if command -v nuke >/dev/null; then
nuke /dev
else
rm -rf /dev
fi
ln -s ${rootmnt}/dev /dev