From 1452de9f64d9df35c14cff45547383e96c9af953 Mon Sep 17 00:00:00 2001 From: Lukas Nykryn Date: Tue, 27 Aug 2024 11:36:49 +0200 Subject: [PATCH] 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 ad2a578e27863930918ab5c3d88aab74b7ebc997) Resolves: RHEL-40660 --- usr/libexec/netconsole | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usr/libexec/netconsole b/usr/libexec/netconsole index 20bee9d4..31ed526a 100755 --- a/usr/libexec/netconsole +++ b/usr/libexec/netconsole @@ -21,8 +21,7 @@ PATH=/sbin:/usr/sbin:$PATH RETVAL=0 -# Check that networking is up. -. /etc/sysconfig/network +[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network # Source function library. . /etc/rc.d/init.d/functions