dracut/0161-Fix-error-message-when-there-are-no-internal-kernel-.patch
Thomas Renninger 7bf826553e Accepting request 251837 from home:trenn:branches:Base:System
- Add ip= and root=nfs.. to dracut internal cmdline to make nfsroot working
  (bnc#896464)
* Add 0160-nfs-Add-ip-.-and-root-nfs.-parameters-to-internal-dr.patch
- Fix error message in case there is no internal dracut cmdline added
  Simple fix
* Add 0161-Fix-error-message-when-there-are-no-internal-kernel-.patch
- Request DHCP lease instead of getting/applying the offer
  No bug number, but Pawel rated this high prio. This should hit SLE12 still.
* Add 0162-network-Request-DHCP-lease-instead-of-getting-applyi.patch

OBS-URL: https://build.opensuse.org/request/show/251837
OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=191
2014-09-24 16:28:44 +00:00

42 lines
1.2 KiB
Diff

From 044c4999b7791f40c27bb5f92b76f67bbd6cc18a Mon Sep 17 00:00:00 2001
From: Thomas Renninger <trenn@suse.de>
Date: Wed, 24 Sep 2014 17:35:28 +0200
Subject: Fix error message when there are no internal kernel commandline
parameters
Otherwise you could get messages like that:
Stored kernel commandline:
/usr/bin/dracut: line 1559: /var/tmp/initramfs.psHn4a/etc/cmdline.d/*.conf: No such file or directory
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
dracut.sh | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/dracut.sh b/dracut.sh
index c301138..eab56f5 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1564,10 +1564,14 @@ if ! ( echo $PARMS_TO_STORE > $initdir/lib/dracut/build-parameter.txt ); then
fi
if [[ $hostonly_cmdline ]] ; then
- dinfo "Stored kernel commandline:"
- for conf in $initdir/etc/cmdline.d/*.conf ; do
- dinfo "$(< $conf)"
- done
+ 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.7.6.1