From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/7 v3] package/busybox: Add facility for DHCP hooks
Date: Wed, 23 Jul 2014 23:58:29 +0200 [thread overview]
Message-ID: <20140723215829.GC17249@free.fr> (raw)
In-Reply-To: <1402982507.184367.599670173206.1.gpush@pablo>
Jeremy, All,
On 2014-06-17 13:21 +0800, Jeremy Kerr spake thusly:
> The (u)dhcpc hook installed by the busybox package configures the
> network and exits. If we want to do anything further with a DHCP lease,
> we'd have to replace the script entirely.
>
> This change introduces a .d directory for hooks (based on the script
> filename), which are executed after the interface configuration. This
> allows packages to drop a script file in the .d directory to perform
> actions on DHCP events.
>
> We'll use this in a later change to notify petitboot of DHCP boot
> information.
>
> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Regards,
Yann E. MORIN.
> ---
> package/busybox/busybox.mk | 2 ++
> package/busybox/udhcpc.script | 6 ++++++
> 2 files changed, 8 insertions(+)
>
> diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk
> index c368b80..bddeb63 100644
> --- a/package/busybox/busybox.mk
> +++ b/package/busybox/busybox.mk
> @@ -222,6 +222,8 @@ define BUSYBOX_INSTALL_TARGET_CMDS
> if [ ! -f $(TARGET_DIR)/usr/share/udhcpc/default.script ]; then \
> $(INSTALL) -m 0755 -D package/busybox/udhcpc.script \
> $(TARGET_DIR)/usr/share/udhcpc/default.script; \
> + $(INSTALL) -m 755 -d \
> + $(TARGET_DIR)/usr/share/udhcpc/default.script.d; \
> fi
> $(BUSYBOX_INSTALL_MDEV_SCRIPT)
> $(BUSYBOX_INSTALL_MDEV_CONF)
> diff --git a/package/busybox/udhcpc.script b/package/busybox/udhcpc.script
> index e23d1f1..50c52e6 100755
> --- a/package/busybox/udhcpc.script
> +++ b/package/busybox/udhcpc.script
> @@ -64,4 +64,10 @@ case "$1" in
> ;;
> esac
>
> +HOOK_DIR="$0.d"
> +for hook in "${HOOK_DIR}/"*; do
> + [ -f "${hook}" -a -x "${hook}" ] || continue
> + "${hook}" "${@}"
> +done
> +
> exit 0
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2014-07-23 21:58 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-17 5:21 [Buildroot] [PATCH 0/7 v3] Enable a buildroot-based petitboot bootloader Jeremy Kerr
2014-06-17 5:21 ` [Buildroot] [PATCH 7/7 v3] Add powerpc64 petitboot defconfig Jeremy Kerr
2014-10-12 15:02 ` Arnout Vandecappelle
2014-10-20 3:27 ` Jeremy Kerr
2014-10-21 21:31 ` Arnout Vandecappelle
2014-06-17 5:21 ` [Buildroot] [PATCH 6/7 v3] package/petitboot: Add petitboot, the userspace bootloader Jeremy Kerr
2014-10-12 14:55 ` Arnout Vandecappelle
2014-10-20 3:22 ` Jeremy Kerr
2014-10-21 21:19 ` Arnout Vandecappelle
2014-06-17 5:21 ` [Buildroot] [PATCH 3/7 v3] package/ncurses: Allow building wide char support Jeremy Kerr
2014-07-04 16:58 ` Gustavo Zacarias
2014-07-16 17:04 ` Thomas De Schampheleire
2014-07-17 0:24 ` Jeremy Kerr
2014-07-17 0:43 ` Gustavo Zacarias
2014-06-17 5:21 ` [Buildroot] [PATCH 4/7 v3] package/powerpc-utils: Add powerpc hardware utilities Jeremy Kerr
2014-07-17 21:07 ` Thomas Petazzoni
2014-06-17 5:21 ` [Buildroot] [PATCH 5/7 v3] package/kexec-lite: Add a package for the kexec-lite tools Jeremy Kerr
2014-07-17 20:54 ` Thomas Petazzoni
2014-06-17 5:21 ` [Buildroot] [PATCH 2/7 v3] package/dropbear: Add separate configuration option for dropbear server Jeremy Kerr
2014-07-17 19:44 ` Gustavo Zacarias
2014-07-23 21:50 ` Thomas Petazzoni
2014-06-17 5:21 ` [Buildroot] [PATCH 1/7 v3] package/busybox: Add facility for DHCP hooks Jeremy Kerr
2014-07-23 21:58 ` Yann E. MORIN [this message]
2014-10-12 14:14 ` Arnout Vandecappelle
2015-01-02 18:28 ` Thomas Petazzoni
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=20140723215829.GC17249@free.fr \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/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