diff mbox

[2/4] busybox: Fix usage when inetd is enabled

Message ID 08e8f31123bb965c9affad7ab84e6d3032ad174b.1399459420.git.christian.braunersorensen@prevas.dk
State Accepted
Delegated to: Esben Haabendal
Headers show

Commit Message

christian.braunersorensen@prevas.dk May 7, 2014, 10:44 a.m. UTC
From: Christian Sørensen <christian.braunersorensen@prevas.dk>

Previously when inetd was enabled in busybox, one wrote inetd commands
directly to ${D}${sysconfdir}/inetd.conf, and to SRC_DIR/inetd.conf.d when
it was not enabled in busybox (but maybe elsewhere).
Since busybox inherits inetd, then, no matter if CONFIG_INETD is enabled
in busybox, the ${SRCDIR}${INETD_CONF_FILES} file, will be put in the
correct dir in D (${D}${sysconfdir}/inetd.d/${PN}. No need to edit
in different files

Signed-off-by: Christian Sørensen <christian.braunersorensen@prevas.dk>
---
 recipes/busybox/busybox-install.inc | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

Comments

Esben Haabendal May 13, 2014, 1:46 p.m. UTC | #1
Merged to master, thanks.

/Esben
diff mbox

Patch

diff --git a/recipes/busybox/busybox-install.inc b/recipes/busybox/busybox-install.inc
index 574c59d..9928506 100644
--- a/recipes/busybox/busybox-install.inc
+++ b/recipes/busybox/busybox-install.inc
@@ -46,30 +46,22 @@  do_install () {
 			${D}${datadir}/udhcpc/default.script
 	fi
 
-	if grep "CONFIG_INETD=y" ${S}/.config; then
-		install -m 0644 ${SRCDIR}/inetd.conf ${D}${sysconfdir}/
-	fi
-
 	if grep "CONFIG_TFTPD=y" ${S}/.config; then
 		if grep "CONFIG_INETD=y" ${S}/.config; then
-			inetd_conf="${D}${sysconfdir}/inetd.conf"
-		else
 			# put it where inetd class finds it, so it can be merged
 			# with inetd.conf when generating image
-			inetd_conf="${SRCDIR}/inetd.conf.d"
+			inetd_conf=${INETD_CONF_FILES}
+				echo "tftp dgram udp nowait root tftpd tftpd -c ${USE_busybox_tftpd_dir}" \
+				>> $inetd_conf
 		fi
-		echo "tftp dgram udp nowait root tftpd tftpd -c ${USE_busybox_tftpd_dir}" \
-			>> $inetd_conf
 		install -d ${D}${USE_busybox_tftpd_dir}
 	fi
 
 	if grep "CONFIG_FTPD=y" ${S}/.config; then
 		if grep "CONFIG_INETD=y" ${S}/.config; then
-			inetd_conf="${D}${sysconfdir}/inetd.conf"
-		else
 			# put it where inetd class finds it, so it can be merged
 			# with inetd.conf when generating image
-			inetd_conf="${SRCDIR}/inetd.conf.d"
+			inetd_conf=${INETD_CONF_FILES}
 		fi
 		echo "ftp stream tcp nowait root ftpd ftpd -w -S ${USE_busybox_ftpd_dir}" \
 			>> $inetd_conf
@@ -77,12 +69,10 @@  do_install () {
 	fi
 
 	if grep "CONFIG_TELNETD=y" ${S}/.config; then
-		if grep "CONFIG_TELNETD=y" ${S}/.config; then
-			inetd_conf="${D}${sysconfdir}/inetd.conf"
-		else
+		if grep "CONFIG_INETD=y" ${S}/.config; then
 			# put it where inetd class finds it, so it can be merged
 			# with inetd.conf when generating image
-			inetd_conf="${SRCDIR}/inetd.conf.d"
+			inetd_conf=${INETD_CONF_FILES}
 		fi
 		echo "telnet stream tcp nowait root telnetd telnetd" \
 			>> $inetd_conf