summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonny Davies <woodchip@gentoo.org>2001-11-21 05:08:55 +0000
committerDonny Davies <woodchip@gentoo.org>2001-11-21 05:08:55 +0000
commitf484a020057963e3a2a80770c0f50a133f606967 (patch)
treef74925a60e184d3d7daf28fb279d4ed186ac65e1 /sys-apps/xinetd
parentnew version (diff)
downloadgentoo-2-f484a020057963e3a2a80770c0f50a133f606967.tar.gz
gentoo-2-f484a020057963e3a2a80770c0f50a133f606967.tar.bz2
gentoo-2-f484a020057963e3a2a80770c0f50a133f606967.zip
This update primarily includes a default /etc/xinetd.conf file which
contains the "includedir /etc/xinetd.d" statement. Now you can have packages which insert sample service snippets into that directory. Also included are a few sample files in /etc/xinetd.d. These internal services are all configured with "disable = yes" by default. The initscript was changed to be more sane.
Diffstat (limited to 'sys-apps/xinetd')
-rw-r--r--sys-apps/xinetd/files/digest-xinetd-2.3.3-r71
-rw-r--r--sys-apps/xinetd/files/etc.xinetd.d/README.services18
-rw-r--r--sys-apps/xinetd/files/etc.xinetd.d/chargen-tcp13
-rw-r--r--sys-apps/xinetd/files/etc.xinetd.d/chargen-udp14
-rw-r--r--sys-apps/xinetd/files/etc.xinetd.d/daytime-tcp13
-rw-r--r--sys-apps/xinetd/files/etc.xinetd.d/daytime-udp14
-rw-r--r--sys-apps/xinetd/files/etc.xinetd.d/echo-tcp13
-rw-r--r--sys-apps/xinetd/files/etc.xinetd.d/echo-udp14
-rw-r--r--sys-apps/xinetd/files/etc.xinetd.d/time-tcp13
-rw-r--r--sys-apps/xinetd/files/etc.xinetd.d/time-udp14
-rw-r--r--sys-apps/xinetd/files/xinetd.conf13
-rw-r--r--sys-apps/xinetd/files/xinetd.rc627
-rw-r--r--sys-apps/xinetd/xinetd-2.3.3-r7.ebuild48
13 files changed, 198 insertions, 17 deletions
diff --git a/sys-apps/xinetd/files/digest-xinetd-2.3.3-r7 b/sys-apps/xinetd/files/digest-xinetd-2.3.3-r7
new file mode 100644
index 000000000000..c7af1620b36c
--- /dev/null
+++ b/sys-apps/xinetd/files/digest-xinetd-2.3.3-r7
@@ -0,0 +1 @@
+MD5 6bbf329e3c101fbd25b68fa933250d74 xinetd-2.3.3.tar.gz 274432
diff --git a/sys-apps/xinetd/files/etc.xinetd.d/README.services b/sys-apps/xinetd/files/etc.xinetd.d/README.services
new file mode 100644
index 000000000000..ba35afc106b4
--- /dev/null
+++ b/sys-apps/xinetd/files/etc.xinetd.d/README.services
@@ -0,0 +1,18 @@
+#
+# Extract from man 5 xinetd.conf:
+#
+Every file inside this directory, excluding files with names
+containing a dot ('.') or end-ing with a tilde ('~'), will be
+parsed as xinetd configuration files. The files will be parsed
+in alphabetical order according to the C locale. This allows
+you to specify services one per file.
+
+
+#
+# Considerations:
+#
+You can make packages install an example service configuration
+file into this directory to easily help users with integrating
+it with xinetd. It would be nice if your package included the
+"disable = yes" directive by default. Its probably wise to
+have the user decide upon enabling services.
diff --git a/sys-apps/xinetd/files/etc.xinetd.d/chargen-tcp b/sys-apps/xinetd/files/etc.xinetd.d/chargen-tcp
new file mode 100644
index 000000000000..04b0fbc32834
--- /dev/null
+++ b/sys-apps/xinetd/files/etc.xinetd.d/chargen-tcp
@@ -0,0 +1,13 @@
+# default: off
+# description: A chargen server. This is the tcp version.
+
+service chargen
+{
+ type = INTERNAL
+ id = chargen-stream
+ socket_type = stream
+ protocol = tcp
+ user = root
+ wait = no
+ disable = yes
+}
diff --git a/sys-apps/xinetd/files/etc.xinetd.d/chargen-udp b/sys-apps/xinetd/files/etc.xinetd.d/chargen-udp
new file mode 100644
index 000000000000..4b34e94c64e2
--- /dev/null
+++ b/sys-apps/xinetd/files/etc.xinetd.d/chargen-udp
@@ -0,0 +1,14 @@
+# default: off
+# description: A chargen server. This is the udp version.
+
+service chargen-udp
+{
+ type = INTERNAL UNLISTED
+ id = chargen-dgram
+ socket_type = dgram
+ protocol = udp
+ user = root
+ wait = yes
+ port = 19
+ disable = yes
+}
diff --git a/sys-apps/xinetd/files/etc.xinetd.d/daytime-tcp b/sys-apps/xinetd/files/etc.xinetd.d/daytime-tcp
new file mode 100644
index 000000000000..2c0cbfee46eb
--- /dev/null
+++ b/sys-apps/xinetd/files/etc.xinetd.d/daytime-tcp
@@ -0,0 +1,13 @@
+# default: off
+# description: A daytime server. This is the tcp version.
+
+service daytime
+{
+ type = INTERNAL
+ id = daytime-stream
+ socket_type = stream
+ protocol = tcp
+ user = root
+ wait = no
+ disable = yes
+}
diff --git a/sys-apps/xinetd/files/etc.xinetd.d/daytime-udp b/sys-apps/xinetd/files/etc.xinetd.d/daytime-udp
new file mode 100644
index 000000000000..30926dd6706d
--- /dev/null
+++ b/sys-apps/xinetd/files/etc.xinetd.d/daytime-udp
@@ -0,0 +1,14 @@
+# default: off
+# description: A daytime server. This is the udp version.
+
+service daytime-udp
+{
+ type = INTERNAL UNLISTED
+ id = daytime-dgram
+ socket_type = dgram
+ protocol = udp
+ user = root
+ wait = yes
+ port = 13
+ disable = yes
+}
diff --git a/sys-apps/xinetd/files/etc.xinetd.d/echo-tcp b/sys-apps/xinetd/files/etc.xinetd.d/echo-tcp
new file mode 100644
index 000000000000..73d13e7b9550
--- /dev/null
+++ b/sys-apps/xinetd/files/etc.xinetd.d/echo-tcp
@@ -0,0 +1,13 @@
+# default: off
+# description: An echo server. This is the tcp version.
+
+service echo
+{
+ type = INTERNAL
+ id = echo-stream
+ socket_type = stream
+ protocol = tcp
+ user = root
+ wait = no
+ disable = yes
+}
diff --git a/sys-apps/xinetd/files/etc.xinetd.d/echo-udp b/sys-apps/xinetd/files/etc.xinetd.d/echo-udp
new file mode 100644
index 000000000000..29cec3fdb8ed
--- /dev/null
+++ b/sys-apps/xinetd/files/etc.xinetd.d/echo-udp
@@ -0,0 +1,14 @@
+# default: off
+# description: An echo server. This is the udp version.
+
+service echo-udp
+{
+ type = INTERNAL UNLISTED
+ id = echo-dgram
+ socket_type = dgram
+ protocol = udp
+ user = root
+ wait = yes
+ port = 7
+ disable = yes
+}
diff --git a/sys-apps/xinetd/files/etc.xinetd.d/time-tcp b/sys-apps/xinetd/files/etc.xinetd.d/time-tcp
new file mode 100644
index 000000000000..76e069ea7457
--- /dev/null
+++ b/sys-apps/xinetd/files/etc.xinetd.d/time-tcp
@@ -0,0 +1,13 @@
+# default: off
+# description: An RFC 868 time server. This is the tcp version, which is used by rdate.
+
+service time
+{
+ type = INTERNAL
+ id = time-stream
+ socket_type = stream
+ protocol = tcp
+ user = root
+ wait = no
+ disable = yes
+}
diff --git a/sys-apps/xinetd/files/etc.xinetd.d/time-udp b/sys-apps/xinetd/files/etc.xinetd.d/time-udp
new file mode 100644
index 000000000000..e6650439a136
--- /dev/null
+++ b/sys-apps/xinetd/files/etc.xinetd.d/time-udp
@@ -0,0 +1,14 @@
+# default: off
+# description: An RFC 868 time server. This is the udp version.
+
+service time-udp
+{
+ type = INTERNAL UNLISTED
+ id = time-dgram
+ socket_type = dgram
+ protocol = udp
+ user = root
+ wait = yes
+ port = 37
+ disable = yes
+}
diff --git a/sys-apps/xinetd/files/xinetd.conf b/sys-apps/xinetd/files/xinetd.conf
new file mode 100644
index 000000000000..31ca50077e56
--- /dev/null
+++ b/sys-apps/xinetd/files/xinetd.conf
@@ -0,0 +1,13 @@
+# Sample configuration file for xinetd
+
+defaults
+{
+ only_from = localhost
+ instances = 60
+ log_type = SYSLOG authpriv info
+ log_on_success = HOST PID
+ log_on_failure = HOST
+ cps = 25 30
+}
+
+includedir /etc/xinetd.d
diff --git a/sys-apps/xinetd/files/xinetd.rc6 b/sys-apps/xinetd/files/xinetd.rc6
index 90e46effcb7a..cb9f8b581a2d 100644
--- a/sys-apps/xinetd/files/xinetd.rc6
+++ b/sys-apps/xinetd/files/xinetd.rc6
@@ -1,37 +1,30 @@
#!/sbin/runscript
+#you may move this into your rc.conf file if you wish
+XINETD_OPTS="-stayalive -reuse"
+
depend() {
need net
}
-autoconfig() {
-if [ ! -e /etc/xinetd.conf ] ; then
- if [ ! -e /etc/inetd.conf ] ; then
+checkconfig() {
+ if [ ! -e /etc/xinetd.conf ] ; then
eerror "You need an /etc/xinetd.conf file to run xinetd"
- eerror "There is a sample one in /usr/share/docs/xinetd"
+ eerror "There is a sample file in /usr/share/doc/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
}
start() {
- autoconfig || return 1
+ checkconfig || return 1
ebegin "Starting xinetd"
- start-stop-daemon --start --quiet --exec /usr/sbin/xinetd 1>&2
+ start-stop-daemon --start --quiet --exec /usr/sbin/xinetd \
+ -- -pidfile /var/run/xinetd.pid ${XINETD_OPTS}
eend $?
}
stop() {
ebegin "Stopping xinetd"
- start-stop-daemon --stop --quiet -u root -n xinetd 1>&2
- # long explanation removed; basically: keep things sane
- if [ $? -ne 0 ] ; then
- if [ -e /dev/shm/.init.d/started/xinetd ] ; then
- eend 0
- fi
- fi
+ start-stop-daemon --stop --quiet --pidfile /var/run/xinetd.pid
eend $?
}
diff --git a/sys-apps/xinetd/xinetd-2.3.3-r7.ebuild b/sys-apps/xinetd/xinetd-2.3.3-r7.ebuild
new file mode 100644
index 000000000000..cb6f1868d62a
--- /dev/null
+++ b/sys-apps/xinetd/xinetd-2.3.3-r7.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer System Team <system@gentoo.org>
+# Author Achim Gottinger <achim@gentoo.org>, Donny Davies <woodchip@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/xinetd/xinetd-2.3.3-r7.ebuild,v 1.1 2001/11/21 05:08:55 woodchip Exp $
+
+# NB: This ebuild introduces the /etc/xinetd.d includedir with a default
+# /etc/xinetd.conf file. Check your config files if you're upgrading
+# from an older ebuild version. You should browse /etc/xinetd.conf
+# and the files in /etc/xinetd.d. Everything is off by default with
+# access restricted to localhost.
+
+S=${WORKDIR}/${P}
+DESCRIPTION="Xinetd is a powerful replacement for inetd, with advanced features"
+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="--with-libwrap"
+
+ ./configure --with-loadavg --host=${CHOST} ${myconf} || die
+
+ # Parallel make does not work
+ make || die
+}
+
+src_install() {
+
+ into /usr ; dosbin xinetd/xinetd
+ exeinto /usr/sbin ; doexe ${FILESDIR}/xconv.pl
+
+ newman xinetd/xinetd.conf.man xinetd.conf.5
+ newman xinetd/xinetd.log.man xinetd.log.8
+ newman xinetd/xinetd.man xinetd.8
+
+ newdoc xinetd/sample.conf xinetd.conf.dist.sample
+ newdoc ${FILESDIR}/xinetd.conf xinetd.conf.default
+ dodoc AUDIT CHANGELOG README COPYRIGHT
+
+ insinto /etc/xinetd.d ; doins ${FILESDIR}/etc.xinetd.d/*
+ exeinto /etc/init.d ; newexe ${FILESDIR}/xinetd.rc6 xinetd
+ insinto /etc ; doins ${FILESDIR}/xinetd.conf
+}