diff mbox

[3/5] busybox: Add use flag for tftpd inetd

Message ID 9d4cae7ef146eb248b545dd830f60c5fdcc62286.1406533543.git.christian.braunersorensen@prevas.dk
State Under Review
Delegated to: Kim
Headers show

Commit Message

christian.braunersorensen@prevas.dk July 28, 2014, 7:50 a.m. UTC
From: Christian Sørensen <christian.braunersorensen@prevas.dk>

USE_busybox_tftpd_inetdcmd: May be used to set the inetd command when
the tftpd is enabled.

Signed-off-by: Christian Sørensen <christian.braunersorensen@prevas.dk>
---
 recipes/busybox/busybox-configure.inc | 4 +++-
 recipes/busybox/busybox-install.inc   | 3 +--
 2 files changed, 4 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/recipes/busybox/busybox-configure.inc b/recipes/busybox/busybox-configure.inc
index 68e56c8..9e545fb 100644
--- a/recipes/busybox/busybox-configure.inc
+++ b/recipes/busybox/busybox-configure.inc
@@ -386,8 +386,10 @@  CONFIG_FEATURE_TFTP_GET,\
 CONFIG_FEATURE_TFTP_PUT,\
 CONFIG_FEATURE_TFTP_BLOCKSIZE"
 # USE flag: tftp daemon root folder
-RECIPE_FLAGS += "busybox_tftpd_dir"
+RECIPE_FLAGS += "busybox_tftpd_dir busybox_tftpd_inetdcmd"
 DEFAULT_USE_busybox_tftpd_dir = "${servicedir}/tftp"
+DEFAULT_USE_busybox_tftpd_inetdcmd = "tftp dgram udp nowait root tftpd tftpd \
+					-c ${USE_busybox_tftpd_dir}"
 
 # USE flag: enable ftp server
 BUSYBOX_SIMPLE_USE_FLAGS += "ftpd:service/ftp:\
diff --git a/recipes/busybox/busybox-install.inc b/recipes/busybox/busybox-install.inc
index 9928506..307afe6 100644
--- a/recipes/busybox/busybox-install.inc
+++ b/recipes/busybox/busybox-install.inc
@@ -51,8 +51,7 @@  do_install () {
 			# put it where inetd class finds it, so it can be merged
 			# with inetd.conf when generating image
 			inetd_conf=${INETD_CONF_FILES}
-				echo "tftp dgram udp nowait root tftpd tftpd -c ${USE_busybox_tftpd_dir}" \
-				>> $inetd_conf
+			echo $USE_busybox_tftpd_inetdcmd >> $inetd_conf
 		fi
 		install -d ${D}${USE_busybox_tftpd_dir}
 	fi