diff options
Diffstat (limited to 'usr/libexec/netconsole')
-rwxr-xr-x | usr/libexec/netconsole | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/usr/libexec/netconsole b/usr/libexec/netconsole index 3f2872dd..48f9bbf4 100755 --- a/usr/libexec/netconsole +++ b/usr/libexec/netconsole @@ -9,6 +9,7 @@ ### BEGIN INIT INFO # Provides: netconsole # Required-Start: $network +# Required-Stop: $network # Short-Description: Initializes network console logging # Description: Initializes network console logging of kernel messages. ### END INIT INFO @@ -40,7 +41,7 @@ kernel=$(uname -r | cut -d. -f1-2) usage () { - echo $"Usage: $0 {start|stop|status|restart|condrestart}" 1>&2 + gprintf "Usage: %s {start|stop|status|restart|condrestart}\n" $0 1>&2 RETVAL=2 } @@ -97,13 +98,13 @@ start () fi fi if [ -z "$SYSLOGADDR" ] ; then - echo $"Server address not specified in /etc/sysconfig/netconsole" 1>&2 + gprintf "Server address not specified in /etc/sysconfig/netconsole\n" 1>&2 exit 6 fi eval $(print_address_info $SYSLOGADDR) if [ -z "$SYSLOGMACADDR" ]; then - echo $"netconsole: can't resolve MAC address of $SYSLOGADDR" 1>&2 + gprintf "netconsole: can't resolve MAC address of %s\n" $SYSLOGADDR 1>&2 exit 1 fi @@ -112,7 +113,7 @@ start () /usr/bin/logger -p daemon.info -t netconsole: inserting netconsole module with arguments \ $SYSLOGOPTS if [ -n "$SYSLOGOPTS" ]; then - action $"Initializing netconsole" modprobe netconsole \ + action "Initializing netconsole" modprobe netconsole \ $SYSLOGOPTS [ "$?" != "0" ] && RETVAL=1 fi @@ -122,7 +123,7 @@ start () stop () { if /sbin/lsmod | grep netconsole >/dev/null 2>&1 ; then - action $"Disabling netconsole" rmmod netconsole; + action "Disabling netconsole" rmmod netconsole; [ "$?" != "0" ] && RETVAL=1 fi @@ -132,10 +133,10 @@ stop () status () { if /sbin/lsmod | grep netconsole >/dev/null 2>&1 ; then - echo $"netconsole module loaded" + gprintf "netconsole module loaded\n" RETVAL=0 else - echo $"netconsole module not loaded" + gprintf "netconsole module not loaded\n" RETVAL=3 fi } |