base: install switch_root to /sbin and call it with the full path
parent
8541b35ed7
commit
bfd602f849
|
@ -332,7 +332,7 @@ wait_for_loginit
|
|||
umask $OLD_UMASK
|
||||
export PATH="$OLD_PATH"
|
||||
|
||||
exec switch_root "$NEWROOT" "$INIT" $initargs || {
|
||||
exec /sbin/switch_root "$NEWROOT" "$INIT" $initargs || {
|
||||
echo "Something went very badly wrong in the initramfs. Please "
|
||||
echo "file a bug against dracut."
|
||||
emergency_shell
|
||||
|
|
|
@ -17,7 +17,8 @@ mkdir -p ${initdir}/initqueue-settled
|
|||
mkdir -p ${initdir}/tmp
|
||||
# Bail out if switch_root does not exist
|
||||
if type -P switch_root >/dev/null; then
|
||||
dracut_install switch_root
|
||||
inst $(type -P switch_root) /sbin/switch_root \
|
||||
|| derror "Failed to install switch_root"
|
||||
else
|
||||
inst "$moddir/switch_root" "/sbin/switch_root" \
|
||||
|| derror "Failed to install switch_root"
|
||||
|
|
Loading…
Reference in New Issue