aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d')
-rw-r--r--rc.d/init.d/netconsole16
1 files changed, 7 insertions, 9 deletions
diff --git a/rc.d/init.d/netconsole b/rc.d/init.d/netconsole
index ba99e2cb..136bfb5f 100644
--- a/rc.d/init.d/netconsole
+++ b/rc.d/init.d/netconsole
@@ -17,10 +17,6 @@ SERVER_ADDRESS_RESOLUTION=
# Check that networking is up.
. /etc/sysconfig/network
-if [ ${NETWORKING} = "no" ]
-then
- exit 0
-fi
# Source function library.
. /etc/rc.d/init.d/functions
@@ -35,11 +31,6 @@ SYSLOGMACADDR=
kernel=`uname -r | cut -d. -f1-2`
-[ -f /etc/sysconfig/netconsole ] || exit 0
-. /etc/sysconfig/netconsole
-
-[ -z "$SYSLOGADDR" ] && exit 0
-
usage ()
{
echo $"Usage: $0 {start|stop|status|restart|condrestart}" 1>&2
@@ -78,11 +69,16 @@ netconsole_failure ()
start ()
{
+ [ -f /etc/sysconfig/netconsole ] || exit 0
+ . /etc/sysconfig/netconsole
+
SYSLOGOPTS=
# syslogd server, if any
+ if [ -n "$SYSLOGADDR" ]; then
if ! [[ "$SYSLOGADDR" =~ "^([0-9]{1,3}\.){3}[0-9]{1,3}$" ]]; then
SYSLOGADDR=$(LANG=C host $SYSLOGADDR 2>/dev/null | awk '/has address / { print $NF }')
fi
+ fi
if [ -z "$SYSLOGADDR" ] ; then
echo $"Server address not specified in /etc/sysconfig/netconsole" 1>&2
exit 1
@@ -118,8 +114,10 @@ status ()
{
if /sbin/lsmod | grep netconsole >/dev/null 2>&1 ; then
echo $"netconsole module loaded"
+ RETVAL=0
else
echo $"netconsole module not loaded"
+ RETVAL=3
fi
}