Accepting request 224742 from home:juwolf:branches:Kernel:kdump

dracut needs rd.neednet=1 commandline parameter to force network activation. Together with Request 224727 to dracut this should solve current kdump-via-network issues (bnc#866771)

OBS-URL: https://build.opensuse.org/request/show/224742
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kdump?expand=0&rev=64
This commit is contained in:
Petr Tesařík 2014-03-14 07:13:36 +00:00 committed by Git OBS Bridge
parent 5299a3343d
commit 4ac9729640
4 changed files with 58 additions and 0 deletions

29
initrd_network.patch Normal file
View File

@ -0,0 +1,29 @@
--- init/mkdumprd.old 2014-03-04 17:51:17.000000000 +0100
+++ init/mkdumprd 2014-03-05 17:57:07.606638345 +0100
@@ -123,6 +123,26 @@
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'"
+ elif [ -z "$KDUMP_NETCONFIG" ] ; then
+ status_message "Network: none"
+ else
+ interface=$(echo "$KDUMP_NETCONFIG" | cut -d ':' -f 1)
+ mode=$(echo "$KDUMP_NETCONFIG" | cut -d ':' -f 2)
+
+ status_message "Network interface: $interface"
+ if [ "$mode" = "static" ] ; then
+ status_message "Network mode: Static IP"
+ DRACUT_ARGS+=" --kernel-cmdline 'rd.neednet=1'"
+ else
+ status_message "Network mode: Automatic IP (DHCP)"
+ DRACUT_ARGS+=" --kernel-cmdline 'rd.neednet=1 ip=${interface}:dhcp'"
+ fi
+ fi
+
# add mount points
kdump_get_mountpoints || return 1
i=0

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Wed Mar 5 16:58:02 UTC 2014 - juwolf@suse.com
- Added dracut network activation in initrd to mkdumprd.
Patch added: initrd_network.patch
-------------------------------------------------------------------
Tue Mar 4 12:19:24 UTC 2014 - juwolf@suse.com
- Fixed wrong argument for ledblink
ledblink_background.patch: Added
-------------------------------------------------------------------
Sun Mar 2 15:35:11 UTC 2014 - ptesarik@suse.cz

View File

@ -49,6 +49,8 @@ PreReq: %insserv_prereq %fillup_prereq mkinitrd
Source: %{name}-%{version}.tar.bz2
Source2: %{name}-%{version}-rpmlintrc
Source3: kdump.service
Patch1: ledblink_background.patch
Patch2: initrd_network.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# rename "kdump-helpers" (10.3) -> "kdump" (11.0/SP2)
Provides: kdump-helpers = %{version}
@ -86,6 +88,8 @@ Authors:
%prep
%setup
%patch1 -p0
%patch2 -p0
%build
export CFLAGS="%optflags"

13
ledblink_background.patch Normal file
View File

@ -0,0 +1,13 @@
--- init/save_dump.sh.old 2014-03-04 12:44:06.595720000 +0100
+++ init/save_dump.sh 2014-03-04 12:44:19.444960000 +0100
@@ -143,8 +143,8 @@
FADUMP_RELEASE_MEM=/sys/kernel/fadump_release_mem
#
-# start LED blinking in background
-kdumptool ledblink --background
+# start LED blinking
+kdumptool ledblink
#
# create core dumps by default here for kdumptool debugging