mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
merge latest init changes
This commit is contained in:
parent
fb06a57581
commit
764dcbe74e
1 changed files with 33 additions and 14 deletions
|
@ -107,14 +107,6 @@ else
|
|||
msg "$(cat /message)"
|
||||
fi
|
||||
|
||||
#Special handling if udev is running
|
||||
udevpid=$(/bin/pidof udevd)
|
||||
if [ -n "${udevpid}" ]; then
|
||||
# Settle pending uevents, then kill udev
|
||||
/sbin/udevadm settle
|
||||
/bin/kill -9 ${udevpid} > /dev/null 2>&1
|
||||
/bin/sleep 0.01
|
||||
fi
|
||||
mkdir -p /new_root
|
||||
if [ -z "${nfsroot}" -a "${root}" != "/dev/nfs" ]; then
|
||||
if [ ${root:0:5} != "/dev/" ] || ! poll_device "${root}" ${rootdelay}; then
|
||||
|
@ -158,7 +150,24 @@ else
|
|||
fi
|
||||
# We didn't build filesystem support into busybox,
|
||||
# instead we use util-linux-ng's blkid for best compatibility
|
||||
if [ -n "${rootfstype}" ]; then
|
||||
fstype="${rootfstype}"
|
||||
else
|
||||
fstype=$(eval $(/sbin/blkid -o udev -p "${root}"); echo $ID_FS_TYPE)
|
||||
if [ -z "${fstype}" ]; then
|
||||
err "Unable to determine the file system type of ${root}:"
|
||||
echo "Either it contains no filesystem, an unknown filesystem,"
|
||||
echo "or more than one valid file system signature was found."
|
||||
echo
|
||||
echo "Try adding"
|
||||
echo " rootfstype=your_filesystem_type"
|
||||
echo "to the kernel command line."
|
||||
echo
|
||||
echo "You are now being dropped into an emergency shell."
|
||||
launch_interactive_shell
|
||||
msg "Trying to continue (this will most likely fail) ..."
|
||||
fi
|
||||
fi
|
||||
if [ "${readwrite}" = "yes" ]; then
|
||||
rwopt="rw"
|
||||
else
|
||||
|
@ -175,6 +184,16 @@ else
|
|||
fi
|
||||
nfsmount ${nfs_option:+-o ${nfs_option}} "${nfs_server}:${nfs_path}" /new_root
|
||||
fi
|
||||
|
||||
#Special handling if udev is running
|
||||
udevpid=$(/bin/pidof udevd)
|
||||
if [ -n "${udevpid}" ]; then
|
||||
# Settle pending uevents, then kill udev
|
||||
/sbin/udevadm settle
|
||||
/bin/kill -9 ${udevpid} > /dev/null 2>&1
|
||||
/bin/sleep 0.01
|
||||
fi
|
||||
|
||||
umount /proc
|
||||
umount /sys
|
||||
[ -z "${init}" ] && init="/sbin/init"
|
||||
|
|
Loading…
Reference in a new issue