summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Robbins <drobbins@gentoo.org>2000-12-10 05:08:51 +0000
committerDaniel Robbins <drobbins@gentoo.org>2000-12-10 05:08:51 +0000
commit53431dbe8b5e6dd7c4b97068d0fda5ca3e0ea928 (patch)
tree781edd6dc3277e2b5713d93e3a0567ac522d3323 /sys-apps/xinetd
parentshtool move (diff)
downloadgentoo-2-53431dbe8b5e6dd7c4b97068d0fda5ca3e0ea928.tar.gz
gentoo-2-53431dbe8b5e6dd7c4b97068d0fda5ca3e0ea928.tar.bz2
gentoo-2-53431dbe8b5e6dd7c4b97068d0fda5ca3e0ea928.zip
supervised xinetd
Diffstat (limited to 'sys-apps/xinetd')
-rwxr-xr-xsys-apps/xinetd/files/xinetd9
-rwxr-xr-xsys-apps/xinetd/files/xinetd-run28
-rw-r--r--sys-apps/xinetd/files/xinetd.conf120
-rw-r--r--sys-apps/xinetd/xinetd-2.1.8.8_p3-r2.ebuild (renamed from sys-apps/xinetd/xinetd-2.1.8.8_p3-r1.ebuild)12
4 files changed, 100 insertions, 69 deletions
diff --git a/sys-apps/xinetd/files/xinetd b/sys-apps/xinetd/files/xinetd
index ff71ba4c47d4..373498ebadb0 100755
--- a/sys-apps/xinetd/files/xinetd
+++ b/sys-apps/xinetd/files/xinetd
@@ -22,20 +22,19 @@ start() {
exit 1
fi
ebegin "Starting ${SERVICE}"
- start-stop-daemon --start --quiet --exec $EXE 1>&2
+ /usr/bin/svc -u /etc/svc.d/control/xinetd
eend $? "Error starting ${SERVICE}."
}
stop() {
ebegin "Stopping ${SERVICE}"
- start-stop-daemon --stop --quiet -u root -n $SERVICE 1>&2
+ /usr/bin/svc -d /etc/svc.d/control/xinetd
eend $? "Error stopping ${SERVICE}."
}
reconfig () {
- ebegin "Reconfiguring ${SERVICE}"
- start-stop-daemon --stop --quiet -u root -n $SERVICE --signal 1 1>&2
- eend $? "Error reconfiguring ${SERVICE}."
+ stop
+ start
}
doservice ${@}
diff --git a/sys-apps/xinetd/files/xinetd-run b/sys-apps/xinetd/files/xinetd-run
new file mode 100755
index 000000000000..6d99b1f5693a
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd-run
@@ -0,0 +1,28 @@
+#!/bin/sh
+#remove stale pid files
+if [ -e /var/run/xinetd.pid ]
+then
+ mypids="`cat /var/run/xinetd.pid`"
+ myrun=`/sbin/pidof xinetd`
+ ok=0
+ for x in $mypids
+ do
+ if [ "$myrun" = "$x" ]
+ then
+ #this is a running xinetd process, pidfile ok
+ ok=1
+ fi
+ done
+ if [ "$ok" = "0" ]
+ then
+ #bogus pidfile, remove
+ rm /var/run/xinetd.pid
+ fi
+fi
+if [ ! -e /var/run/xinetd.pid ]
+then
+ /usr/sbin/xinetd -pid 2> /var/run/xinetd.pid
+ /usr/bin/sleep 1
+fi
+exec /usr/bin/watchpid `cat /var/run/xinetd.pid`
+
diff --git a/sys-apps/xinetd/files/xinetd.conf b/sys-apps/xinetd/files/xinetd.conf
index 1a914d050813..0097f317b052 100644
--- a/sys-apps/xinetd/files/xinetd.conf
+++ b/sys-apps/xinetd/files/xinetd.conf
@@ -35,69 +35,69 @@ defaults
per_source = 5
}
-service time
-{
- flags = REUSE NAMEINARGS
- socket_type = stream
- protocol = tcp
- wait = no
- user = root
- type = INTERNAL
- id = time-stream
-}
+#service time
+#{
+# flags = REUSE NAMEINARGS
+# socket_type = stream
+# protocol = tcp
+# wait = no
+# user = root
+# type = INTERNAL
+# id = time-stream
+#}
-service time
-{
- flags = REUSE NAMEINARGS
- socket_type = dgram
- protocol = udp
- wait = yes
- user = root
- type = INTERNAL
- id = time-dgram
-}
+#service time
+#{
+# flags = REUSE NAMEINARGS
+# socket_type = dgram
+# protocol = udp
+# wait = yes
+# user = root
+# type = INTERNAL
+# id = time-dgram
+#}
-service ftp
-{
- flags = REUSE NAMEINARGS
- socket_type = stream
- protocol = tcp
- wait = no
- user = root
- server = /usr/sbin/tcpd
- server_args = proftpd
-}
+#service ftp
+#{
+# flags = REUSE NAMEINARGS
+# socket_type = stream
+# protocol = tcp
+# wait = no
+# user = root
+# server = /usr/sbin/tcpd
+# server_args = proftpd
+#}
-service smtp
-{
- flags = REUSE NAMEINARGS
- socket_type = stream
- protocol = tcp
- wait = no
- user = root
- server = /var/qmail/bin/tcp-env
- server_args = tcp-env /var/qmail/bin/qmail-smtpd
-}
+#service smtp
+#{
+# flags = REUSE NAMEINARGS
+# socket_type = stream
+# protocol = tcp
+# wait = no
+# user = root
+# server = /var/qmail/bin/tcp-env
+# server_args = tcp-env /var/qmail/bin/qmail-smtpd
+#}
-service pop-3
-{
- flags = REUSE NAMEINARGS
- socket_type = stream
- protocol = tcp
- wait = no
- user = root
- server = /var/qmail/bin/qmail-popup
- server_args = qmail-popup localhost /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir
-}
+#service pop-3
+#{
+# flags = REUSE NAMEINARGS
+# socket_type = stream
+# protocol = tcp
+# wait = no
+# user = root
+# server = /var/qmail/bin/qmail-popup
+# server_args = qmail-popup localhost /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir
+#}
-service swat
-{
- flags = REUSE NAMEINARGS
- socket_type = stream
- protocol = tcp
- wait = no
- user = root
- server = /usr/sbin/swat
- server_args = swat
-}
+#service swat
+#{
+# flags = REUSE NAMEINARGS
+# socket_type = stream
+# protocol = tcp
+# wait = no
+# user = root
+# server = /usr/sbin/swat
+# server_args = swat
+#}
diff --git a/sys-apps/xinetd/xinetd-2.1.8.8_p3-r1.ebuild b/sys-apps/xinetd/xinetd-2.1.8.8_p3-r2.ebuild
index 054bae645789..e5bbfba12b92 100644
--- a/sys-apps/xinetd/xinetd-2.1.8.8_p3-r1.ebuild
+++ b/sys-apps/xinetd/xinetd-2.1.8.8_p3-r2.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2000 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author Achim Gottinger <achim@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/xinetd/xinetd-2.1.8.8_p3-r1.ebuild,v 1.4 2000/11/30 23:14:35 achim Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/xinetd/xinetd-2.1.8.8_p3-r2.ebuild,v 1.1 2000/12/10 05:08:51 drobbins Exp $
P=xinetd-2.1.8.8p3
A=${P}.tar.gz
@@ -25,9 +25,13 @@ src_install() {
cd ${S}
try make prefix=${D}/usr install
dodoc CHANGELOG README COPYRIGHT
- dodir /etc/rc.d/init.d
- cp ${O}/files/xinetd ${D}/etc/rc.d/init.d/xinetd
- cp ${O}/files/xinetd.conf ${D}/etc
+ exeinto /etc/rc.d/init.d
+ doexe ${FILESDIR}/xinetd
+ insinto /etc
+ doins ${FILESDIR}/xinetd.conf
+ exeinto /etc/svc.d/services/xinetd
+ doexe ${FILESDIR}/xinetd-run
+ touch /etc/svc.d/services/xinetd/down
}