summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonny Davies <woodchip@gentoo.org>2001-09-01 14:25:45 +0000
committerDonny Davies <woodchip@gentoo.org>2001-09-01 14:25:45 +0000
commitf0aac8b8691d04b212ee28eeb0ee9e6c15615ae0 (patch)
tree118ee7aff017763e26b138542f60bf132ae562a1 /sys-apps/xinetd
parenttemp xinetd blockage (diff)
downloadgentoo-2-f0aac8b8691d04b212ee28eeb0ee9e6c15615ae0.tar.gz
gentoo-2-f0aac8b8691d04b212ee28eeb0ee9e6c15615ae0.tar.bz2
gentoo-2-f0aac8b8691d04b212ee28eeb0ee9e6c15615ae0.zip
Xinetd is finally finished. rc6 and rc5 are both currently support, along with appropriate blocks on the profiles. If you update xinetd ebuilds you will have to adjust the profiles accordignly. The only trick is not forgetting to update the rc5 profile, the rc6 one should not need updating.
Diffstat (limited to 'sys-apps/xinetd')
-rw-r--r--sys-apps/xinetd/files/xinetd.rc631
-rw-r--r--sys-apps/xinetd/xinetd-2.3.3-r1.ebuild46
2 files changed, 75 insertions, 2 deletions
diff --git a/sys-apps/xinetd/files/xinetd.rc6 b/sys-apps/xinetd/files/xinetd.rc6
index 8d815204b0b9..e9e079c04e4e 100644
--- a/sys-apps/xinetd/files/xinetd.rc6
+++ b/sys-apps/xinetd/files/xinetd.rc6
@@ -7,17 +7,18 @@ depend() {
autoconfig() {
if [ ! -e /etc/xinetd.conf ] ; then
if [ ! -e /etc/inetd.conf ] ; then
- eerror "You need an /etc/xinetd.conf file to run xinetd!"
+ eerror "You need an /etc/xinetd.conf file to run xinetd"
return 1
else
einfo "Auto-creating xinetd.conf from your inetd.conf.."
/usr/sbin/xconv.pl < /etc/inetd.conf > /etc/xinetd.conf
fi
fi
+ return
}
start() {
- autoconfig
+ autoconfig || return 1
ebegin "Starting xinetd"
start-stop-daemon --start --quiet --exec /usr/sbin/xinetd 1>&2
eend $?
@@ -26,5 +27,31 @@ start() {
stop() {
ebegin "Stopping xinetd"
start-stop-daemon --stop --quiet -u root -n xinetd 1>&2
+
+ #
+ # This will gracefully handle the case where the dependency
+ # engine thinks xinetd is running, when in fact it isn't.
+ # Under those circumstances the above command will fail.
+ # This will jam us into a situation where "xinetd stop"
+ # will never work and "xinetd start" will always think
+ # xinetd is running. We _want_ to protect integrity of
+ # the dependency init system.
+ #
+ # This phenomenon can happen a couple of ways:
+ # 1. The /etc/xinetd.conf exists, but it doesnt have any
+ # service xxxx { ... } sections configured.
+ # This is _exactly_ what will happen if for some reason
+ # /etc/inetd.conf is either void of configured services
+ # (everything commented) or it is 0-bytes long, and xconv.pl
+ # is run against it (see autoconfig() above)
+ # 2. if xinetd is terminated behind the dependency engines
+ # back. ie, killall xinetd.
+ # ~woodchip
+ #
+ if [ $? -eq 1 ] ; then
+ if [ -e /dev/shm/.init.d/started/xinetd ] ; then
+ eend 0
+ fi
+ fi
eend $?
}
diff --git a/sys-apps/xinetd/xinetd-2.3.3-r1.ebuild b/sys-apps/xinetd/xinetd-2.3.3-r1.ebuild
new file mode 100644
index 000000000000..3323659aab54
--- /dev/null
+++ b/sys-apps/xinetd/xinetd-2.3.3-r1.ebuild
@@ -0,0 +1,46 @@
+# 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.3.3-r1.ebuild,v 1.1 2001/09/01 14:25:45 woodchip Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="Replacement for inetd."
+HOMEPAGE="http://www.xinetd.org"
+SRC_URI="http://www.xinetd.org/${P}.tar.gz"
+
+DEPEND="virtual/glibc tcpd? ( >=sys-apps/tcp-wrappers-7.6-r2 )"
+RDEPEND="virtual/glibc sys-devel/perl"
+
+src_compile() {
+ local myconf
+ use tcpd && myconf="$myconf--with-libwrap"
+ use ipv6 && myconf="$myconf --with-inet6"
+
+ ./configure --with-loadavg --prefix=/usr --mandir=/usr/share/man --host=${CHOST} $myconf || die
+ # Parallel make does not work
+ make || die
+}
+
+src_install() {
+ cd ${S}
+ make prefix=${D}/usr MANDIR=${D}/usr/share/man install
+ dodoc CHANGELOG README COPYRIGHT ${FILESDIR}/xinetd.conf
+
+ #
+ # install a functional, but "services commented out" config
+ # file. ie: dont turn on *anything* which the administrator
+ # has not specifically enabled! This is a safe thing to do
+ # since I have allowed the init script to cope gracefully in
+ # that situation. Previously, if we installed a "commented
+ # out only" sample /etc/xinetd.conf file, things would not
+ # work too well. See the /etc/init.d/xinetd script itself
+ # for more details. ~woodchip
+ #
+ insinto /etc
+ doins ${FILESDIR}/xinetd.conf
+
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/xinetd.rc6 xinetd
+ exeinto /usr/sbin
+ doexe ${FILESDIR}/xconv.pl
+}