Blob Blame History Raw
From fe273e3901f0931c3cc1365177f82f03b6560d30 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Thu, 11 Dec 2014 15:46:07 +0100
Subject: [PATCH] Print stored dracut commandline during initramfs build

When generating the initramfs we should be printing out the
generated dracut commandline used for booting.
This will simplify debugging.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
 dracut.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/dracut.sh b/dracut.sh
index a542f33..cda7955 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1584,6 +1584,16 @@ if ! ( echo $PARMS_TO_STORE > $initdir/lib/dracut/build-parameter.txt ); then
     exit 1
 fi
 
+if [[ $hostonly_cmdline ]] ; then
+    if [ -d $initdir/etc/cmdline.d ];then
+        dinfo "Stored kernel commandline:"
+        for conf in $initdir/etc/cmdline.d/*.conf ; do
+            dinfo "$(< $conf)"
+        done
+    else
+        dinfo "No dracut internal kernel commandline stored in initrd"
+    fi
+fi
 rm -f -- "$outfile"
 dinfo "*** Creating image file ***"