Skip to content

Commit 1452de9

Browse files
lnykrynjamacku
authored andcommitted
netconsole: source sysconfig/network only if it exists
Although the comment said "check if network is up", the code only sourced the configuration file, but did not fail if it did not exist and happily continued. Also on current versions of Fedora, the sysconfig/network does not exist by default, so you see a warning message when you start the service. So let's just check if the file exists and only source it if it does (for backwards compatibility). (cherry picked from commit ad2a578) Resolves: RHEL-40660
1 parent b8b18db commit 1452de9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

usr/libexec/netconsole

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
PATH=/sbin:/usr/sbin:$PATH
2222
RETVAL=0
2323

24-
# Check that networking is up.
25-
. /etc/sysconfig/network
24+
[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network
2625

2726
# Source function library.
2827
. /etc/rc.d/init.d/functions

0 commit comments

Comments
 (0)