rpms/xinetd/devel xinetd.init,1.11,1.12 xinetd.spec,1.50,1.51
Jan Šafránek (jsafrane)
fedora-extras-commits at redhat.com
Mon Jan 28 13:35:41 UTC 2008
Author: jsafrane
Update of /cvs/pkgs/rpms/xinetd/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16316
Modified Files:
xinetd.init xinetd.spec
Log Message:
initscript made LDB compliant
Resolves: #247099
Index: xinetd.init
===================================================================
RCS file: /cvs/pkgs/rpms/xinetd/devel/xinetd.init,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- xinetd.init 17 May 2007 06:45:51 -0000 1.11
+++ xinetd.init 28 Jan 2008 13:35:02 -0000 1.12
@@ -15,6 +15,24 @@
# config: /etc/xinetd.conf
# pidfile: /var/run/xinetd.pid
+
+### BEGIN INIT INFO
+# Provides:
+# Required-Start: $network
+# Required-Stop:
+# Should-Start:
+# Should-Stop:
+# Default-Start: 3 4 5
+# Default-Stop: 0 1 2 6
+# Short-Description: start and stop xinetd
+# Description: xinetd is a powerful replacement for inetd. \
+# xinetd has access control mechanisms, extensive \
+# logging capabilities, the ability to make services \
+# available based on time, and can place \
+# limits on the number of servers that can be started, \
+# among other things.
+### END INIT INFO
+
PATH=/sbin:/bin:/usr/bin:/usr/sbin
# Source function library.
@@ -27,20 +45,14 @@
test -f /etc/sysconfig/xinetd && . /etc/sysconfig/xinetd
-# Check that we are root ... so non-root users stop here
-[ `id -u` = 0 ] || exit 1
-
-# Check that networking is up.
-[ "${NETWORKING}" = "yes" ] || exit 0
-
-[ -f /usr/sbin/xinetd ] || exit 1
-[ -f /etc/xinetd.conf ] || exit 1
-
RETVAL=0
prog="xinetd"
start(){
+ [ -f /usr/sbin/xinetd ] || exit 5
+ [ -f /etc/xinetd.conf ] || exit 6
+
echo -n $"Starting $prog: "
# Localization for xinetd is controlled in /etc/synconfig/xinetd
@@ -60,21 +72,27 @@
daemon $prog -stayalive -pidfile /var/run/xinetd.pid "$EXTRAOPTIONS"
RETVAL=$?
echo
- touch /var/lock/subsys/xinetd
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/xinetd
return $RETVAL
}
stop(){
+ [ -f /usr/sbin/xinetd ] || exit 5
+ [ -f /etc/xinetd.conf ] || exit 6
+
echo -n $"Stopping $prog: "
- killproc $prog
+ killproc -p /var/run/xinetd.pid $prog
RETVAL=$?
echo
- rm -f /var/lock/subsys/xinetd
+ [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/xinetd
return $RETVAL
}
reload(){
+ [ -f /usr/sbin/xinetd ] || exit 5
+ [ -f /etc/xinetd.conf ] || exit 6
+
echo -n $"Reloading configuration: "
killproc $prog -HUP
RETVAL=$?
@@ -88,8 +106,13 @@
}
condrestart(){
- [ -e /var/lock/subsys/xinetd ] && restart
- return 0
+ if [ -e /var/lock/subsys/xinetd ] ; then
+ restart
+ RETVAL=$?
+ return $RETVAL
+ fi
+ RETVAL=0
+ return $RETVAL
}
@@ -97,9 +120,11 @@
case "$1" in
start)
start
+ RETVAL=$?
;;
stop)
stop
+ RETVAL=$?
;;
status)
status $prog
@@ -107,16 +132,21 @@
;;
restart)
restart
+ RETVAL=$?
;;
reload)
+ force-reload)
reload
+ RETVAL=$?
;;
condrestart)
+ try-restart)
condrestart
+ RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
- RETVAL=1
+ RETVAL=2
esac
exit $RETVAL
Index: xinetd.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xinetd/devel/xinetd.spec,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- xinetd.spec 18 Sep 2007 11:12:18 -0000 1.50
+++ xinetd.spec 28 Jan 2008 13:35:02 -0000 1.51
@@ -1,7 +1,7 @@
Summary: A secure replacement for inetd.
Name: xinetd
Version: 2.3.14
-Release: 14%{?dist}
+Release: 15%{?dist}
License: xinetd
Group: System Environment/Daemons
Epoch: 2
@@ -102,6 +102,9 @@
%{_mandir}/*/*
%changelog
+* Thu Sep 6 2007 Jan Safranek <jsafranek at redhat.com> - 2:2.3.14-15
+- initscript made LDB compliant (#247099)
+
* Thu Sep 6 2007 Jan Safranek <jsafranek at redhat.com> - 2:2.3.14-14
- removed inetdconvert script, nobody is using inetd
More information about the fedora-extras-commits
mailing list