]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
[PATCH 03/50] Use getarg to get the root kernel commandline parameter.
authorVictor Lowther <victor.lowther@gmail.com>
Fri, 13 Feb 2009 12:41:38 +0000 (04:41 -0800)
committerDave Jones <davej@redhat.com>
Mon, 16 Feb 2009 18:56:40 +0000 (13:56 -0500)
init

diff --git a/init b/init
index b5b0b1b3d97d0ba9b98092d96212062852cb467f..7b2a9856789944148104053ea0059e562d58ee25 100755 (executable)
--- a/init
+++ b/init
@@ -58,13 +58,8 @@ NEWROOT="/sysroot"
 # FIXME: there's got to be a better way ...
 # it'd be nice if we had a udev rule that just did all of the bits for
 # figuring out what the specified root is and linking it /dev/root
-for o in `cat /proc/cmdline` ; do
-  case $o in 
-  root=*)
-    root=${o#root=}
-    ;;
-  esac
-done
+root=$(getarg 'root=*'); root=${root#root=}
+
 echo -n "Going to mount rootfs ($root)"
 if [ -z "$root" ]; then 
   echo "Warning: no root specified"