From: Jean-Claude Monnin <jc_monnin@emailplus.org>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 2/2] busybox: add option to install udhcpd start script
Date: Fri, 8 Nov 2013 11:52:07 +0100 [thread overview]
Message-ID: <FD99EB3B-02F2-45B0-ABE1-8E9366CC9EDA@emailplus.org> (raw)
In-Reply-To: <75A20F57-1DBF-4D40-BBA2-FE8148E1E03A@emailplus.org>
Signed-off-by: Jean-Claude Monnin <jc_monnin@emailplus.org>
---
generic/etc/init.d/udhcpd | 21 +++++++++++++++++++++
rules/busybox-bbinit.in | 6 ++++++
rules/busybox.in | 6 ++++++
rules/busybox.make | 10 ++++++++++
4 files changed, 43 insertions(+)
create mode 100644 generic/etc/init.d/udhcpd
diff --git a/generic/etc/init.d/udhcpd b/generic/etc/init.d/udhcpd
new file mode 100644
index 0000000..a10226e
--- /dev/null
+++ b/generic/etc/init.d/udhcpd
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# /etc/init.d/udhcpd
+#
+# $Id$
+#
+
+if [ -f /usr/sbin/udhcpd ]; then
+ echo "Starting udhcpd..."
+ /usr/sbin/udhcpd
+ exit 0
+fi
+
+if [ -f /sbin/udhcpd ]; then
+ echo "Starting udhcpd..."
+ /sbin/udhcpd -d
+ exit 0
+fi
+
+echo "No udhcpd found. Aborting"
+
diff --git a/rules/busybox-bbinit.in b/rules/busybox-bbinit.in
index d414a51..65c8c79 100644
--- a/rules/busybox-bbinit.in
+++ b/rules/busybox-bbinit.in
@@ -30,6 +30,12 @@ config BUSYBOX_TELNETD_BBINIT_LINK
prompt "telnetd"
default "S16telnetd"
+config BUSYBOX_UDHCPD_BBINIT_LINK
+ string
+ depends on BUSYBOX_UDHCPD_STARTSCRIPT
+ prompt "udhcpd"
+ default "S60udpcpd"
+
config BUSYBOX_BB_SYSCTL_BBINIT_LINK
string
depends on BUSYBOX_BB_SYSCTL_STARTSCRIPT
diff --git a/rules/busybox.in b/rules/busybox.in
index 28a68a3..7a41e7c 100644
--- a/rules/busybox.in
+++ b/rules/busybox.in
@@ -52,6 +52,12 @@ choice
start busybox telnetd server from inetd
endchoice
+config BUSYBOX_UDHCPD_STARTSCRIPT
+ bool
+ depends on BUSYBOX_UDHCPD
+ default y
+ prompt "Install /etc/init.d/udhcpd"
+
config BUSYBOX_SYSLOGD_STARTSCRIPT
bool
depends on BUSYBOX_SYSLOGD
diff --git a/rules/busybox.make b/rules/busybox.make
index c02f594..385b2c4 100644
--- a/rules/busybox.make
+++ b/rules/busybox.make
@@ -163,6 +163,16 @@ ifneq ($(call remove_quotes,$(PTXCONF_BUSYBOX_TELNETD_BBINIT_LINK)),)
endif
endif
+ifdef PTXCONF_BUSYBOX_UDHCPD_STARTSCRIPT
+ @$(call install_alternative, busybox, 0, 0, 0755, /etc/init.d/udhcpd)
+
+ifneq ($(call remove_quotes,$(PTXCONF_BUSYBOX_UDHCPD_BBINIT_LINK)),)
+ @$(call install_link, busybox, \
+ ../init.d/udhcpd, \
+ /etc/rc.d/$(PTXCONF_BUSYBOX_UDHCPD_BBINIT_LINK))
+endif
+endif
+
ifdef PTXCONF_BUSYBOX_SYSLOGD_STARTSCRIPT
@$(call install_alternative, busybox, 0, 0, 0755, /etc/init.d/syslogd)
--
1.8.1.2
--
ptxdist mailing list
ptxdist@pengutronix.de
prev parent reply other threads:[~2013-11-08 10:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-08 10:49 [ptxdist] udhcpd start script and config file Jean-Claude Monnin
2013-11-08 10:51 ` [ptxdist] [PATCH 1/2] busybox: add generic config file for udhcpd Jean-Claude Monnin
2013-11-08 10:52 ` Jean-Claude Monnin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=FD99EB3B-02F2-45B0-ABE1-8E9366CC9EDA@emailplus.org \
--to=jc_monnin@emailplus.org \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox