[PATCH 03/31] Some dracut cleanups and bashification.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use getarg to get the root kernel commandline parameter.

---
 init |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/init b/init
index b5b0b1b..7b2a985 100755
--- 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"
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux