diff options
Diffstat (limited to 'sys-apps/xinetd/files')
-rw-r--r-- | sys-apps/xinetd/files/digest-xinetd-2.3.3-r7 | 1 | ||||
-rw-r--r-- | sys-apps/xinetd/files/etc.xinetd.d/README.services | 18 | ||||
-rw-r--r-- | sys-apps/xinetd/files/etc.xinetd.d/chargen-tcp | 13 | ||||
-rw-r--r-- | sys-apps/xinetd/files/etc.xinetd.d/chargen-udp | 14 | ||||
-rw-r--r-- | sys-apps/xinetd/files/etc.xinetd.d/daytime-tcp | 13 | ||||
-rw-r--r-- | sys-apps/xinetd/files/etc.xinetd.d/daytime-udp | 14 | ||||
-rw-r--r-- | sys-apps/xinetd/files/etc.xinetd.d/echo-tcp | 13 | ||||
-rw-r--r-- | sys-apps/xinetd/files/etc.xinetd.d/echo-udp | 14 | ||||
-rw-r--r-- | sys-apps/xinetd/files/etc.xinetd.d/time-tcp | 13 | ||||
-rw-r--r-- | sys-apps/xinetd/files/etc.xinetd.d/time-udp | 14 | ||||
-rw-r--r-- | sys-apps/xinetd/files/xinetd.conf | 13 | ||||
-rw-r--r-- | sys-apps/xinetd/files/xinetd.rc6 | 27 |
12 files changed, 150 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 $? } |