File 0334-Ensure-dracut.sh-responds-properly-to-hostonly_cmdli.patch of Package dracut.6321
From 5635792d79d0ea5dd5b7879340816a992d91f18c Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
Date: Mon, 17 Jul 2017 16:51:39 +0200
Subject: [PATCH 2/2] Ensure dracut.sh responds properly to
hostonly_cmdline="no"
Reference: bsc#1048748
---
dracut.conf.5.asc | 4 ++--
dracut.sh | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dracut.conf.5.asc b/dracut.conf.5.asc
index be62da98..7bcfa850 100644
--- a/dracut.conf.5.asc
+++ b/dracut.conf.5.asc
@@ -76,8 +76,8 @@ Configuration files must have the extension .conf; other extensions are ignored.
Host-Only mode: Install only what is needed for booting the local host
instead of a generic host and generate host-specific configuration.
-*hostonly_cmdline*"__{yes|no}__"::
- If set, store the kernel command line arguments needed in the initramfs
+*hostonly_cmdline=*"__{yes|no}__"::
+ If set to "yes", store the kernel command line arguments needed in the initramfs
*persistent_policy=*"__<policy>__"::
Use _<policy>_ to address disks and partitions.
diff --git a/dracut.sh b/dracut.sh
index acb31efe..6c854cb1 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1572,7 +1572,7 @@ if ! ( echo $PARMS_TO_STORE > $initdir/lib/dracut/build-parameter.txt ); then
exit 1
fi
-if [[ $hostonly_cmdline ]] ; then
+if [[ $hostonly_cmdline == "yes" ]] ; then
unset _stored_cmdline
if [ -d $initdir/etc/cmdline.d ];then
dinfo "Stored kernel commandline:"
--
2.12.3