rpms/rusers/devel rstatd.init, 1.3, 1.4 rusers.spec, 1.23, 1.24 rusersd.init, 1.2, 1.3
Jiří Moskovčák (jmoskovc)
fedora-extras-commits at redhat.com
Tue Jul 24 11:40:08 UTC 2007
Author: jmoskovc
Update of /cvs/extras/rpms/rusers/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31575
Modified Files:
rstatd.init rusers.spec rusersd.init
Log Message:
Fixed init scripts to comply with LSB standard
Index: rstatd.init
===================================================================
RCS file: /cvs/extras/rpms/rusers/devel/rstatd.init,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- rstatd.init 9 Sep 2004 11:56:30 -0000 1.3
+++ rstatd.init 24 Jul 2007 11:39:34 -0000 1.4
@@ -5,19 +5,35 @@
# performance metrics for any machine on that network.
# processname: rpc.rstatd
+### BEGIN INIT INFO
+# Provides: rpc.rstatd
+# 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.rstatd
+# Description: The rstat protocol allows users on a network to retrieve \
+# performance metrics for any machine on that network.
+### 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
start() {
+ if [ $UID -ne 0 ] ; then
+ #user had insufficient privilege
+ exit 4
+ fi
+ # Check that networking is up.
+ if [ ${NETWORKING} = "no" ]
+ then
+ exit 6 #considered not configured
+ fi
echo -n $"Starting rstat services: "
daemon rpc.rstatd
RETVAL=$?
@@ -28,6 +44,10 @@
}
stop() {
+ if [ $UID -ne 0 ] ; then
+ #user had insufficient privilege
+ exit 4
+ fi
echo -n $"Stopping rstat services: "
killproc rpc.rstatd
RETVAL=$?
@@ -52,18 +72,22 @@
;;
status)
status rpc.rstatd
+ RETVAL=$?
;;
- restart|reload)
+ restart|force-reload)
restart
;;
condrestart)
[ -f /var/lock/subsys/rstatd ] && restart || :
;;
+ reload)
+ RETVAL=3
+ ;;
*)
- echo $"Usage: $0 {start|stop|status|restart}"
- exit 1
+ echo $"Usage: $0 {start|stop|status|restart|reload|force-reload}"
+ RETVAL=2
;;
esac
-exit $?
+exit $RETVAL
Index: rusers.spec
===================================================================
RCS file: /cvs/extras/rpms/rusers/devel/rusers.spec,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- rusers.spec 9 Aug 2006 12:39:57 -0000 1.23
+++ rusers.spec 24 Jul 2007 11:39:34 -0000 1.24
@@ -5,7 +5,7 @@
Summary: Displays the users logged into machines on the local network.
Name: rusers
Version: 0.17
-Release: 47
+Release: 48
License: BSD
Group: System Environment/Daemons
Source: ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/netkit-rusers-%{version}.tar.gz
@@ -144,6 +144,10 @@
%config /etc/rc.d/init.d/rstatd
%changelog
+* Mon Jul 23 2007 Jiri Moskovcak <jmoskovc at redhat.com> 0.17-48
+- Fixed init scripts to comply with LSB standard
+- Resolves: #247047
+
* Wed Aug 09 2006 Phil Knirsch <pknirsch at redhat.com> 0.17-47
- Modified the RHEL3 procpartitions patch to work on recent 2.6 kernels (#201839)
Index: rusersd.init
===================================================================
RCS file: /cvs/extras/rpms/rusers/devel/rusersd.init,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- rusersd.init 9 Sep 2004 11:56:00 -0000 1.2
+++ rusersd.init 24 Jul 2007 11:39:34 -0000 1.3
@@ -5,21 +5,35 @@
# who is logged in on other responding machines.
# processname: rpc.rusersd
+### BEGIN INIT INFO
+# Provides: rpc.rusersd
+# 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.rusersd
+# Description: The rusers protocol allows users on a network to identify \
+# who is logged in on other responding machines.
+### 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
start() {
+ if [ $UID -ne 0 ] ; then
+ #user had insufficient privilege
+ exit 4
+ fi
+ # Check that networking is up.
+ if [ ${NETWORKING} = "no" ]
+ then
+ exit 0
+ fi
status portmap > /dev/null
RETVAL=$?
[ $RETVAL -ne 0 ] && /etc/rc.d/init.d/portmap start
@@ -32,6 +46,10 @@
}
stop() {
+ if [ $UID -ne 0 ] ; then
+ #user had insufficient privilege
+ exit 4
+ fi
echo -n $"Stopping rusers services: "
killproc rpc.rusersd
RETVAL=$?
@@ -55,17 +73,21 @@
;;
status)
status rpc.rusersd
+ RETVAL=$?
;;
- restart|reload)
+ restart|force-reload)
restart
;;
+ reload)
+ RETVAL=3
+ ;;
condrestart)
[ -f /var/lock/subsys/rusersd ] && restart || :
;;
*)
- echo $"Usage: $0 {start|stop|status|restart}"
- exit 1
+ echo $"Usage: $0 {start|stop|status|restart|reload|force-reload}"
+ RETVAL=2
;;
esac
-exit $?
+exit $RETVAL
More information about the fedora-extras-commits
mailing list