Init script rewrite to comply with LSB standard
This commit is contained in:
parent
796e3bdca3
commit
12778ca9f3
@ -1,7 +1,7 @@
|
||||
Summary: Client for sending messages to a host's logged in users.
|
||||
Name: rwall
|
||||
Version: 0.17
|
||||
Release: 25.2.2
|
||||
Release: 26
|
||||
License: BSD
|
||||
Group: System Environment/Daemons
|
||||
Source: ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/netkit-rwall-%{version}.tar.gz
|
||||
@ -100,6 +100,10 @@ fi
|
||||
%config /etc/rc.d/init.d/rwalld
|
||||
|
||||
%changelog
|
||||
* Mon Jul 23 2007 Jiri Moskovcak <jmoskovc@redhat.com> - 0.17-26
|
||||
- init script rewrite to comply with the LSB standard
|
||||
- Resolves: #247048
|
||||
|
||||
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 0.17-25.2.2
|
||||
- rebuild
|
||||
|
||||
|
68
rwalld.init
68
rwalld.init
@ -6,36 +6,55 @@
|
||||
# users can do with the wall command).
|
||||
# processname: rpc.rwalld
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: rpc.rwalld
|
||||
# Required-Start: $syslog $network
|
||||
# Required-Stop: $syslog $network
|
||||
# Default-Start:
|
||||
# Default-Stop: 0 1 2 3 4 5 6
|
||||
# Short-Description: start and stop rpc.rwalld
|
||||
# Description: The rwall protocol allows remote users to display messages \
|
||||
# on all of the active terminals on a system (like local \
|
||||
# users can do with the wall command).
|
||||
### END INIT INFO
|
||||
|
||||
# Source function library.
|
||||
. /etc/init.d/functions
|
||||
|
||||
# Get config.
|
||||
. /etc/sysconfig/network
|
||||
|
||||
# Check that networking is up.
|
||||
if [ ${NETWORKING} = "no" ] ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
RETVAL=0
|
||||
prog="rwalld"
|
||||
|
||||
start() {
|
||||
echo -n $"Starting $prog: "
|
||||
daemon rpc.rwalld
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/rwalld
|
||||
return $RETVAL
|
||||
if [ $UID -ne 0 ] ; then
|
||||
#user had insufficient privilege
|
||||
exit 4
|
||||
fi
|
||||
# Check that networking is up.
|
||||
if [ ${NETWORKING} = "no" ] ; then
|
||||
exit 6
|
||||
fi
|
||||
echo -n $"Starting $prog: "
|
||||
daemon rpc.rwalld
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/rwalld
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n $"Stopping $prog: "
|
||||
killproc rpc.rwalld
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/rwalld
|
||||
return $RETVAL
|
||||
if [ $UID -ne 0 ] ; then
|
||||
#user had insufficient privilege
|
||||
exit 4
|
||||
fi
|
||||
echo -n $"Stopping $prog: "
|
||||
killproc rpc.rwalld
|
||||
RETVAL=$?
|
||||
echo
|
||||
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/rwalld
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
restart() {
|
||||
@ -53,17 +72,24 @@ case "$1" in
|
||||
;;
|
||||
status)
|
||||
status rpc.rwalld
|
||||
RETVAL=$?
|
||||
;;
|
||||
condrestart)
|
||||
[ -f /var/lock/subsys/rwalld ] && restart || :
|
||||
;;
|
||||
restart|reload)
|
||||
force-reload)
|
||||
restart
|
||||
;;
|
||||
restart)
|
||||
restart
|
||||
;;
|
||||
reload)
|
||||
RETVAL=3
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart}"
|
||||
exit 1
|
||||
echo $"Usage: $0 {start|stop|status|restart|reload|force-reload|condrestart}"
|
||||
RETVAL=2
|
||||
;;
|
||||
esac
|
||||
|
||||
exit $?
|
||||
exit $RETVAL
|
||||
|
Loading…
Reference in New Issue
Block a user