[PATCH 22/33] Print stored dracut commandline during initramfs build

Thomas Renninger
2014-11-20T14:56:57Z

From: Hannes Reinecke <hare-l3A5Bk7waGM@public.gmane.org>

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-l3A5Bk7waGM@public.gmane.org>
Signed-off-by: Thomas Renninger <trenn-l3A5Bk7waGM@public.gmane.org>
---
dracut.sh | 10 ++++++++++
1 file changed, 10 insertions(+)

diff --git a/dracut.sh b/dracut.sh
index 4590f79..9a19b43 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1576,6 +1576,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 ***"

--
1.8.5.2