Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.0:Staging:E
kdump
kdump-fail-if-fadump-cannot-be-registered.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File kdump-fail-if-fadump-cannot-be-registered.patch of Package kdump
From: Petr Tesarik <ptesarik@suse.com> Date: Mon Jun 26 13:22:10 2017 +0200 Subject: Fail at startup if fadump cannot be registered References: bsc#1040567 Upstream: v0.8.17 Git-commit: 99a38e490012da75d83efb83385d42edbea100e9 If writing "1" into /sys/kernel/fadump_registered fails for whatever reason, do not return success. Signed-off-by: Petr Tesarik <ptesarik@suse.com> diff --git a/init/load.sh b/init/load.sh index 1894551..4fc7a82 100755 --- a/init/load.sh +++ b/init/load.sh @@ -241,17 +241,19 @@ function load_kdump_fadump() fi local msg + local result=0 # The kernel fails with EINVAL if registered already # (see bnc#814780) - if [ $(cat "$FADUMP_REGISTERED") != "1" ] ; then - local output=$( (echo 1 > "$FADUMP_REGISTERED") 2>&1) - local result=$? + if [ "$(cat $FADUMP_REGISTERED)" != "1" ] ; then + local output - if [ $result -eq 0 ] ; then + output=$( (echo 1 > "$FADUMP_REGISTERED") 2>&1) + if [ $? -eq 0 ] ; then msg="Registered fadump" else msg="FAILED to register fadump: $output" + result=1 fi else msg="fadump is already registered"
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