File 0333-dracut.sh-handle-empty-initrd-etc-cmdline.d.patch of Package dracut.6321
From 868191749b3c5c501084df179b4380d1f050b11d Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Wed, 21 Jan 2015 09:32:20 +0100
Subject: [PATCH 1/2] dracut.sh: handle empty $initrd/etc/cmdline.d
---
dracut.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dracut.sh b/dracut.sh
index 030ab1d2..acb31efe 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1573,12 +1573,16 @@ if ! ( echo $PARMS_TO_STORE > $initdir/lib/dracut/build-parameter.txt ); then
fi
if [[ $hostonly_cmdline ]] ; then
+ unset _stored_cmdline
if [ -d $initdir/etc/cmdline.d ];then
dinfo "Stored kernel commandline:"
for conf in $initdir/etc/cmdline.d/*.conf ; do
+ [ -e "$conf" ] || continue
dinfo "$(< $conf)"
+ _stored_cmdline=1
done
- else
+ fi
+ if ! [[ $_stored_cmdline ]]; then
dinfo "No dracut internal kernel commandline stored in initrd"
fi
fi
--
2.12.3