]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
95rootfs-block: Correctly terminate commandline parameter
authorHannes Reinecke <hare@suse.de>
Thu, 11 Dec 2014 14:46:32 +0000 (15:46 +0100)
committerHarald Hoyer <harald@redhat.com>
Tue, 16 Dec 2014 12:29:37 +0000 (13:29 +0100)
95rootfs-block would not terminate the commandline parameter with
a space or newline, instead it'll rely on the main routine from
dracut.sh to do this.
Which will cause unexpected problems for any modules called
after this.

So terminate the commandline parameters correctly here and remove
the newline from dracut.sh.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
dracut.sh
modules.d/95rootfs-block/module-setup.sh

index 2eba19ba7a2038307a38a9ae2bbd224423ee7eff..f384d2dd9632696cc41b19d31fbb6e365d249d95 100755 (executable)
--- a/dracut.sh
+++ b/dracut.sh
@@ -1299,7 +1299,6 @@ if [[ $print_cmdline ]]; then
         module_cmdline "$_d_mod"
     done
     unset moddir
-    printf "\n"
     exit 0
 fi
 
index 81de1773a28aa0b1c0c2bdf918c36874296e6b18..33875f80e3e3f506a3027c33993638f7dd3b466c 100755 (executable)
@@ -22,7 +22,7 @@ cmdline_journal() {
             fi
 
             if [ -n "$journaldev" ]; then
-                printf " root.journaldev=%s" "$journaldev"
+                echo "root.journaldev=${journaldev}"
             fi
         done
     fi
@@ -32,9 +32,9 @@ cmdline_journal() {
 cmdline_rootfs() {
     local dev=/dev/block/$(find_root_block_device)
     if [ -e $dev ]; then
-        printf " root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")"
-        printf " rootflags=%s" "$(find_mp_fsopts /)"
-        printf " rootfstype=%s" "$(find_mp_fstype /)"
+        printf "root=%s" "$(shorten_persistent_dev "$(get_persistent_dev "$dev")")"
+        printf "rootflags=%s" "$(find_mp_fsopts /)"
+        printf "rootfstype=%s\n" "$(find_mp_fstype /)"
     fi
 }