From 53431dbe8b5e6dd7c4b97068d0fda5ca3e0ea928 Mon Sep 17 00:00:00 2001 From: Daniel Robbins Date: Sun, 10 Dec 2000 05:08:51 +0000 Subject: supervised xinetd --- sys-apps/xinetd/files/xinetd | 9 +-- sys-apps/xinetd/files/xinetd-run | 28 +++++++ sys-apps/xinetd/files/xinetd.conf | 120 ++++++++++++++-------------- sys-apps/xinetd/xinetd-2.1.8.8_p3-r1.ebuild | 35 -------- sys-apps/xinetd/xinetd-2.1.8.8_p3-r2.ebuild | 39 +++++++++ 5 files changed, 131 insertions(+), 100 deletions(-) create mode 100755 sys-apps/xinetd/files/xinetd-run delete mode 100644 sys-apps/xinetd/xinetd-2.1.8.8_p3-r1.ebuild create mode 100644 sys-apps/xinetd/xinetd-2.1.8.8_p3-r2.ebuild (limited to 'sys-apps/xinetd') 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-r1.ebuild deleted file mode 100644 index 054bae645789..000000000000 --- a/sys-apps/xinetd/xinetd-2.1.8.8_p3-r1.ebuild +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 1999-2000 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License, v2 or later -# Author Achim Gottinger -# $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 $ - -P=xinetd-2.1.8.8p3 -A=${P}.tar.gz -S=${WORKDIR}/${P} -DESCRIPTION="Replacement for inetd." -HOMEPAGE="http://www.xinetd.org" -SRC_URI="http://www.xinetd.org/${A}" -DEPEND=">=sys-libs/glibc-2.1.3" -RDEPEND="$DEPEND - >=sys-apps/bash-2.04 - >=sys-devel/perl-5.6" - -src_compile() { - try ./configure --with-loadavg --with-libwrap --prefix=/usr --host=${CHOST} - # Parallel make does not work - try make - -} - -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 -} - - - - diff --git a/sys-apps/xinetd/xinetd-2.1.8.8_p3-r2.ebuild b/sys-apps/xinetd/xinetd-2.1.8.8_p3-r2.ebuild new file mode 100644 index 000000000000..e5bbfba12b92 --- /dev/null +++ b/sys-apps/xinetd/xinetd-2.1.8.8_p3-r2.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Achim Gottinger +# $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 +S=${WORKDIR}/${P} +DESCRIPTION="Replacement for inetd." +HOMEPAGE="http://www.xinetd.org" +SRC_URI="http://www.xinetd.org/${A}" +DEPEND=">=sys-libs/glibc-2.1.3" +RDEPEND="$DEPEND + >=sys-apps/bash-2.04 + >=sys-devel/perl-5.6" + +src_compile() { + try ./configure --with-loadavg --with-libwrap --prefix=/usr --host=${CHOST} + # Parallel make does not work + try make + +} + +src_install() { + cd ${S} + try make prefix=${D}/usr install + dodoc CHANGELOG README COPYRIGHT + 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 +} + + + + -- cgit v1.2.3-65-gdbad