From c7f3005fbc05e27da9b58636bb521187615a70f97666231d30ffcc7514a3ae49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Tesa=C5=99=C3=ADk?= Date: Mon, 17 Mar 2014 14:41:20 +0000 Subject: [PATCH] Accepting request 226472 from home:ptesarik:branches:Kernel:kdump fix KDUMP_NETCONFIG OBS-URL: https://build.opensuse.org/request/show/226472 OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kdump?expand=0&rev=69 --- kdump-initrd-network.patch | 28 ++++++++++++++++++++++++---- kdump.changes | 12 ++++++++++++ kdump.spec | 3 +++ 3 files changed, 39 insertions(+), 4 deletions(-) diff --git a/kdump-initrd-network.patch b/kdump-initrd-network.patch index 89c9d84..5422c3c 100644 --- a/kdump-initrd-network.patch +++ b/kdump-initrd-network.patch @@ -5,19 +5,26 @@ Patch-mainline: not yet Acked-by: Petr Tesarik --- - init/mkdumprd | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) + init/mkdumprd | 28 +++++++++++++++++++++++++++- + 1 file changed, 27 insertions(+), 1 deletion(-) --- a/init/mkdumprd +++ b/init/mkdumprd -@@ -123,6 +123,26 @@ function run_dracut() +@@ -119,10 +119,34 @@ function run_mkinitrd() + # Create a new initrd using dracut {{{ + function run_dracut() + { ++ local modules="kdump" ++ + . /lib/kdump/setup-kdump.functions DRACUT_ARGS="--force --hostonly --omit 'systemd plymouth resume usrmount'" + # network configuration + if [ "$KDUMP_NETCONFIG" = "auto" ] ; then + status_message "Network: auto" -+ DRACUT_ARGS+=" --kernel-cmdline 'rd.neednet=1'" ++ DRACUT_ARGS+=" --kernel-cmdline 'rd.neednet=1 ip=any'" ++ modules="$modules network" + elif [ -z "$KDUMP_NETCONFIG" ] ; then + status_message "Network: none" + else @@ -32,8 +39,21 @@ Acked-by: Petr Tesarik + status_message "Network mode: Automatic IP (DHCP)" + DRACUT_ARGS+=" --kernel-cmdline 'rd.neednet=1 ip=${interface}:dhcp'" + fi ++ modules="$modules network" + fi + # add mount points kdump_get_mountpoints || return 1 i=0 +@@ -135,8 +159,10 @@ function run_dracut() + done + + # Check for additional modules +- modules="kdump" + for protocol in "${kdump_Protocol[@]}" ; do ++ if [ "$protocol" = "nfs" ]; then ++ modules="$modules nfs" ++ fi + if [ "$protocol" = "cifs" -o "$protocol" = "smb" ]; then + modules="$modules cifs" + fi diff --git a/kdump.changes b/kdump.changes index a0494d1..497ee51 100644 --- a/kdump.changes +++ b/kdump.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Mon Mar 17 14:39:01 UTC 2014 - ptesarik@suse.cz + +- kdump-initrd-network.patch: fix KDUMP_NETCONFIG="auto" + +------------------------------------------------------------------- +Mon Mar 17 12:33:49 UTC 2014 - ptesarik@suse.cz + +- add dependency on dracut-network in SLE12 and Factory +- kdump-initrd-network.patch: include dracut 'network' module if + network is required + ------------------------------------------------------------------- Fri Mar 14 11:03:35 UTC 2014 - ptesarik@suse.cz diff --git a/kdump.spec b/kdump.spec index 8449f8a..f1c62b8 100644 --- a/kdump.spec +++ b/kdump.spec @@ -62,6 +62,9 @@ Requires: kexec-tools %if %suse_version > 1220 %systemd_requires %endif +%if %suse_version > 1310 +Requires: dracut-network +%endif Recommends: nfs-client cifs-utils PreReq: coreutils sed ExcludeArch: s390 ppc