linuxrc: move devmgr termination code to devmgr_terminate

master
Fabio Erculiani 12 years ago
parent 8ab82e8b23
commit 68892f5c65

@ -553,6 +553,15 @@ devmgr_init() {
fi
}
# Terminate the device manager, this happens right before pivot_root
devmgr_terminate() {
if is_udev; then
udevadm settle
udevadm control --exit || bad_msg "Unable to terminate udevd"
fi
# mdev doesn't require anything, it seems
}
mount_devfs () {
# Use devtmpfs if enabled in kernel,
# else tmpfs. Always run mdev just in case

@ -318,17 +318,12 @@ fi
verbose_kmsg
devmgr_terminate
good_msg "Booting (initramfs)"
cd "${CHROOT}"
mkdir "${CHROOT}/proc" "${CHROOT}/sys" "${CHROOT}/run" 2>/dev/null
is_udev && udevadm settle
if is_udev
then
udevadm control --exit || bad_msg "Unable to terminate udevd"
fi
mkdir -p "${CHROOT}/proc" "${CHROOT}/sys" "${CHROOT}/run"
# If devtmpfs is mounted, try move it to the new root
# If that fails, try to unmount all possible mounts of devtmpfs as stuff breaks otherwise

Loading…
Cancel
Save