]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
[PATCH 38/50] Missed some non-POSIX substitution in root filesystem label parsing.
authorVictor Lowther <victor.lowther@gmail.com>
Fri, 13 Feb 2009 12:43:02 +0000 (04:43 -0800)
committerDave Jones <davej@redhat.com>
Mon, 16 Feb 2009 18:56:42 +0000 (13:56 -0500)
init

diff --git a/init b/init
index 84ae051b9f393b9a04f6345fcc879012b253282d..4b36e69007a639167b75447cc35522279d15a674 100755 (executable)
--- a/init
+++ b/init
@@ -10,7 +10,7 @@ emergency_shell()
     echo ; echo
     echo "Bug in initramfs /init detected. Dropping to a shell. Good luck!"
     echo
-    sh < /dev/console
+    exec sh -i
 }
 
 getarg() {
@@ -34,7 +34,7 @@ export TERM=linux
 trap "emergency_shell" 0
 # /dev/console comes from the built-in initramfs crud in the kernel
 # someday, we may need to mkdir /dev first here
-exec > /dev/console 2>&1 < /dev/console
+exec > /dev/console 2>&1 < /dev/console
 
 # mount some important things
 mount -t proc /proc /proc
@@ -66,7 +66,7 @@ NEWROOT="/sysroot"
 root=$(getarg root); root=${root#root=}
 case $root in
     LABEL=*) root=${root#LABEL=}
-             root=${root//\//\\x2f}
+             root="$(echo $root |sed 's,/,\\x2f,g')"
             root="/dev/disk/by-label/${root}" ;;
     UUID=*) root="/dev/disk/by-uuid/${root#UUID=}" ;;
     '') echo "Warning: no root specified"