]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
dracut-lib: read multiple lines from $init/etc/cmdline
authorHarald Hoyer <harald@redhat.com>
Fri, 15 Jan 2010 11:33:41 +0000 (12:33 +0100)
committerHarald Hoyer <harald@redhat.com>
Fri, 15 Jan 2010 11:33:41 +0000 (12:33 +0100)
dracut.8
modules.d/99base/dracut-lib.sh

index 869c99970c78caabe6e5274011bce9ba205c7fbd..563d0d1b2aea5c41af814af25eacef06dfaa9ff1 100644 (file)
--- a/dracut.8
+++ b/dracut.8
@@ -369,6 +369,9 @@ debug network scripts in dracut. Output is written to /tmp/
 Any files found in /conf/conf.d/ will be sourced in the initramfs to 
 set initial values. Command line options will override these values 
 set in the configuration files.
+.TP
+.B /etc/cmdline
+Can contain additional command line options.
 
 .SH FILES
 .TP
index faf3c0ae8cd372191040f8bb09e8ebc52734cf56..42db21a4ce703befb70bde9a7d173ca37e52e178 100644 (file)
@@ -2,7 +2,11 @@ getarg() {
     set +x
     local o line
     if [ -z "$CMDLINE" ]; then
-       [ -e /etc/cmdline ] && read CMDLINE_ETC </etc/cmdline;
+        if [ -e /etc/cmdline ]; then
+            while read line; do
+                CMDLINE_ETC="$CMDLINE_ETC $line";
+            done </etc/cmdline;
+        fi
        read CMDLINE </proc/cmdline;
        CMDLINE="$CMDLINE $CMDLINE_ETC"
     fi
@@ -32,7 +36,11 @@ getargs() {
     set +x
     local o line found
     if [ -z "$CMDLINE" ]; then
-       [ -e /etc/cmdline ] && read CMDLINE_ETC </etc/cmdline;
+       if [ -e /etc/cmdline ]; then
+            while read line; do
+                CMDLINE_ETC="$CMDLINE_ETC $line";
+            done </etc/cmdline;
+        fi
        read CMDLINE </proc/cmdline;
        CMDLINE="$CMDLINE $CMDLINE_ETC"
     fi