From: Harald Hoyer Date: Mon, 25 Oct 2010 10:31:38 +0000 (+0200) Subject: base: install switch_root to /sbin and call it with the full path X-Git-Tag: 008~107 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bfd602f8498830af64733508165f73d1194f2dce;p=thirdparty%2Fdracut.git base: install switch_root to /sbin and call it with the full path --- diff --git a/modules.d/99base/init b/modules.d/99base/init index 1a58daf2c..db4d6dc2d 100755 --- a/modules.d/99base/init +++ b/modules.d/99base/init @@ -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 diff --git a/modules.d/99base/install b/modules.d/99base/install index aa897e8bd..0435e329c 100755 --- a/modules.d/99base/install +++ b/modules.d/99base/install @@ -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"