Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dirkmueller:acdc:as_python3_module
kdump.21349
kdump-fix-incorrect-exit-code-checking.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File kdump-fix-incorrect-exit-code-checking.patch of Package kdump.21349
Date: Tue May 25 12:48:08 2021 +0200 From: Petr Tesarik <ptesarik@suse.com> Subject: Fix incorrect exit code checking after "local" with assignment References: bsc#1184616 LTC#192282 Upstream: merged Git-commit: 33abc7c481f62c23727505eafa354253088dae8d The "local" keyword cannot be combined with the assignment if the exit status is needed later. The exit status of the whole statement is that of the "local" built-in (always zero), regardless of the the exit status of the assignment. Acked-by: Petr Tesarik <ptesarik@suse.com> --- init/load.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/init/load.sh +++ b/init/load.sh @@ -305,7 +305,8 @@ function load_kdump_fadump() # Find the desired kernel and initrd function find_kernel() { - local output=$($KDUMPTOOL find_kernel) + local output + output=$($KDUMPTOOL find_kernel) test $? -eq 0 || return 1 kdump_kernel=$(echo "$output" | grep ^Kernel | cut -f 2) @@ -318,7 +319,8 @@ function find_kernel() # Rebuild the kdump initramfs if necessary function rebuild_kdumprd() { - local output=$(mkdumprd -K "$kdump_kernel" -I "$kdump_initrd" 2>&1) + local output + output=$(mkdumprd -K "$kdump_kernel" -I "$kdump_initrd" 2>&1) if [ $? -ne 0 ] ; then echo "$output" return 1
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