Patchwork xinetd: Add default options.

login
register
mail settings
Submitter xin.ouyang@windriver.com
Date June 20, 2012, 7:17 a.m.
Message ID <1340176637-19586-1-git-send-email-xin.ouyang@windriver.com>
Download mbox | patch
Permalink /patch/30277/
State Accepted
Commit 53b6da085bfa78885f68b5d7db40d8c4e3f2f5bb
Headers show

Comments

xin.ouyang@windriver.com - June 20, 2012, 7:17 a.m.
From: Xin Ouyang <Xin.Ouyang@windriver.com>

Currently, xinetd cannot start if no service enabled.

 # /etc/init.d/xinetd start
 # ps aux | grep xinetd
 # cat /var/log/syslog
 xinetd[862]: 862 {init_services} no services. Exiting...

So add -stayalive option by default, as most distos do. 

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
---
 meta/recipes-extended/xinetd/xinetd/xinetd.default |   12 ++++++++++++
 meta/recipes-extended/xinetd/xinetd_2.3.15.bb      |    3 +++
 2 files changed, 15 insertions(+)
 create mode 100644 meta/recipes-extended/xinetd/xinetd/xinetd.default
Richard Purdie - June 21, 2012, 12:28 p.m.
On Wed, 2012-06-20 at 15:17 +0800, xin.ouyang@windriver.com wrote:
> From: Xin Ouyang <Xin.Ouyang@windriver.com>
> 
> Currently, xinetd cannot start if no service enabled.
> 
>  # /etc/init.d/xinetd start
>  # ps aux | grep xinetd
>  # cat /var/log/syslog
>  xinetd[862]: 862 {init_services} no services. Exiting...
> 
> So add -stayalive option by default, as most distos do. 
> 
> Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
> ---
>  meta/recipes-extended/xinetd/xinetd/xinetd.default |   12 ++++++++++++
>  meta/recipes-extended/xinetd/xinetd_2.3.15.bb      |    3 +++
>  2 files changed, 15 insertions(+)
>  create mode 100644 meta/recipes-extended/xinetd/xinetd/xinetd.default

Merged to master, thanks.

Richard

Patch

diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd.default b/meta/recipes-extended/xinetd/xinetd/xinetd.default
new file mode 100644
index 0000000..20a38e3
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/xinetd.default
@@ -0,0 +1,12 @@ 
+# Default settings for xinetd. This file is sourced by /bin/sh from
+# /etc/init.d/xinetd
+
+# enable xinetd Inetd compat mode
+INETD_COMPAT=Yes
+
+# Options to pass to xinetd
+#
+# -stayalive comes by default : it can be removed if xinetd is expected
+# not to start when no service is configured
+#
+XINETD_OPTS="-stayalive"
diff --git a/meta/recipes-extended/xinetd/xinetd_2.3.15.bb b/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
index 3d55e99..a142143 100644
--- a/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
+++ b/meta/recipes-extended/xinetd/xinetd_2.3.15.bb
@@ -12,6 +12,7 @@  PR = "r0"
 SRC_URI = "http://www.xinetd.org/xinetd-${PV}.tar.gz \
       file://xinetd.init \
       file://xinetd.conf \
+      file://xinetd.default \
       file://Various-fixes-from-the-previous-maintainer.patch \
       file://Disable-services-from-inetd.conf-if-a-service-with-t.patch \
       file://xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch \
@@ -40,8 +41,10 @@  do_install() {
 	install -d "${D}/usr/sbin"
 	install -d "${D}/etc/init.d"
 	install -d "${D}/etc/xinetd.d"
+	install -d "${D}/etc/default"
 	install -m 644 "${WORKDIR}/xinetd.conf" "${D}/etc"
 	install -m 755 "${WORKDIR}/xinetd.init" "${D}/etc/init.d/xinetd"
+	install -m 644 "${WORKDIR}/xinetd.default" "${D}/etc/default/xinetd"
 	install -m 755 "${S}/xinetd/xinetd" "${D}/usr/sbin"
 	install -m 755 "${S}/xinetd/itox" "${D}/usr/sbin"
 }