aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2007-08-07 15:31:49 +0000
committerBill Nottingham <notting@redhat.com>2007-08-07 15:31:49 +0000
commitd342d1f4a82d4b792e1069f2db74362e7cf1ae7a (patch)
tree2dc8e6c55751a01cdea42abb305d6cf9ab3adda7 /rc.d/init.d
parenteb2f5f75f66ea1bb5852292d1548b15459f056ea (diff)
downloadinitscripts-d342d1f4a82d4b792e1069f2db74362e7cf1ae7a.tar
initscripts-d342d1f4a82d4b792e1069f2db74362e7cf1ae7a.tar.gz
initscripts-d342d1f4a82d4b792e1069f2db74362e7cf1ae7a.tar.bz2
initscripts-d342d1f4a82d4b792e1069f2db74362e7cf1ae7a.tar.xz
initscripts-d342d1f4a82d4b792e1069f2db74362e7cf1ae7a.zip
assorted cleanups
Diffstat (limited to 'rc.d/init.d')
-rw-r--r--rc.d/init.d/netconsole22
1 files changed, 7 insertions, 15 deletions
diff --git a/rc.d/init.d/netconsole b/rc.d/init.d/netconsole
index 136bfb5f..b25fed81 100644
--- a/rc.d/init.d/netconsole
+++ b/rc.d/init.d/netconsole
@@ -34,7 +34,7 @@ kernel=`uname -r | cut -d. -f1-2`
usage ()
{
echo $"Usage: $0 {start|stop|status|restart|condrestart}" 1>&2
- RETVAL=1
+ RETVAL=3
}
print_address_info ()
@@ -59,35 +59,27 @@ print_address_info ()
fi
}
-netconsole_failure ()
-{
- echo -n "$1"
- failure
- echo
- exit 1
-}
-
start ()
{
- [ -f /etc/sysconfig/netconsole ] || exit 0
+ [ -f /etc/sysconfig/netconsole ] || exit 6
. /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
+ 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
+ exit 6
fi
eval $(print_address_info $SYSLOGADDR)
if [ -z "$SYSLOGMACADDR" ]; then
echo $"netconsole: can't resolve MAC address of $SYSLOGADDR" 1>&2
- netconsole_failure "syslog server address resolution"
+ exit 1
fi
SYSLOGOPTS="netconsole=$LOCALPORT@$LOCALADDR/$DEV,$SYSLOGPORT@$SYSLOGADDR/$SYSLOGMACADDR "