Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
kdump
kdump-net-0001-restore-bridge.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File kdump-net-0001-restore-bridge.patch of Package kdump
From: Petr Tesarik <ptesarik@suse.com> Date: Fri, 19 Aug 2016 13:09:06 +0200 Subject: Restore bridge devices in kdump environment References: bsc#980328 Patch-mainline: v0.8.16 Git-commit: 516128cbd0509bb96dffeaa2e483d39545085e06 While the current approach works for a typical setup, it's definitely better to restore a bridge with all its physical devices. Signed-off-by: Petr Tesarik <ptesarik@suse.com> --- init/setup-kdump.functions | 43 +++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) --- a/init/setup-kdump.functions +++ b/init/setup-kdump.functions @@ -120,23 +120,20 @@ function kdump_bridge_phys_dev() { local ifname="$1" - if [ -d "/sys/class/net/$ifname/bridge" -a \ - -d "/sys/class/net/$ifname/brif" ] ; then + [ -d "/sys/class/net/$ifname/bridge" -a \ + -d "/sys/class/net/$ifname/brif" ] || return 1 - local ifname2 count=0 - local -a res - for ifname2 in "/sys/class/net/$ifname/brif"/*; do - case "$(readlink -f "$ifname2")" in - /sys/devices/virtual/*) - continue - esac - res[count]="${ifname2##*/}" - count=$(( count+1 )) - done - ifname=${res[@]} - fi - - echo "$ifname" + local ifname2 count=0 + local -a res + for ifname2 in "/sys/class/net/$ifname/brif"/*; do + case "$(readlink -f "$ifname2")" in + /sys/devices/virtual/*) + continue + esac + res[count]="${ifname2##*/}" + count=$(( count+1 )) + done + echo "${res[@]}" } # }}} # @@ -202,8 +199,18 @@ function kdump_netdev_mode() # { function kdump_ifname_config() # {{{ { local iface="$1" - local hwaddr=$(<"/sys/class/net/$iface/address") - [ -n "$hwaddr" ] && echo "ifname=$iface:$hwaddr" + + local phys + if phys=$(kdump_bridge_phys_dev "$iface") ; then + echo -n " bridge=$iface:${phys// */,}" + for iface in ${phys} + do + kdump_ifname_config "$iface" + done + else + local hwaddr=$(<"/sys/class/net/$iface/address") + [ -n "$hwaddr" ] && echo -n " ifname=$iface:$hwaddr" + fi } # }}} #
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor