]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
base: install switch_root to /sbin and call it with the full path
authorHarald Hoyer <harald@redhat.com>
Mon, 25 Oct 2010 10:31:38 +0000 (12:31 +0200)
committerHarald Hoyer <harald@redhat.com>
Mon, 25 Oct 2010 10:31:38 +0000 (12:31 +0200)
modules.d/99base/init
modules.d/99base/install

index 1a58daf2c78b78cfe65732c2e9e58436c7366157..db4d6dc2d1870e58bf0a7d749655597089d10348 100755 (executable)
@@ -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
index aa897e8bd2397b2bc7d10dc35f75b8c00f129c44..0435e329c3f1f08593353a71cefdaa3c6b93612a 100755 (executable)
@@ -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"