Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Do if-post-up.d and if-pre-down.d belong in the device table?
@ 2013-08-31 17:59 Danomi Manchego
  2013-09-08 19:57 ` Peter Korsgaard
  0 siblings, 1 reply; 3+ messages in thread
From: Danomi Manchego @ 2013-08-31 17:59 UTC (permalink / raw)
  To: buildroot

Peter, Gustavo,

I was looking into some if-up/down stuff, and stumbled on this commit that
added if-post-up.d and if-pre-down.d to the device_table.txt:

http://lists.busybox.net/pipermail/buildroot/2012-April/053214.html

But in actuality, busybox does not execute scripts from those places.
 Rather, the busybox change was to treat "post-up" and "pre-down" key words
as aliases for "up" and "down", just like the full-blown ifupdown-0.6.16.
 I.e., if you search for the underlying "execute_all" operations in either
busybox-1.21.0/networking/ifupdown.c or in the upstream ifupdown, you will
see that only "pre-up", "up", "down, and "post-down" directory contents are
executed, and that "up" scripts are invoked after the up action has
occurred, and the "down" scripts are run before the down action has
occurred - giving them the roles of "post-up" and "pre-down".

I think having the extra two directories in the device table might mislead
people into thinking that scripts there will be executed.  Or have I
misunderstood something?  For sure, it's not executing scripts from those
places with busybox-1.21.1 ...

FYI, the busybox commit that added the "post-up" and "pre-down" support can
be reviewed at:

http://lists.busybox.net/pipermail/busybox-cvs/2012-April/033401.html


Danomi -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130831/def972ea/attachment.html>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] Do if-post-up.d and if-pre-down.d belong in the device table?
  2013-08-31 17:59 [Buildroot] Do if-post-up.d and if-pre-down.d belong in the device table? Danomi Manchego
@ 2013-09-08 19:57 ` Peter Korsgaard
  2013-09-09 11:59   ` Gustavo Zacarias
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Korsgaard @ 2013-09-08 19:57 UTC (permalink / raw)
  To: buildroot

>>>>> "Danomi" == Danomi Manchego <danomimanchego123@gmail.com> writes:

Hi,

 Danomi> Peter, Gustavo,
 Danomi> I was looking into some if-up/down stuff, and stumbled on this commit that
 Danomi> added if-post-up.d and if-pre-down.d to the device_table.txt:

It would be good if you had sent this mail also to Gustavo's and my
email addresses, to ensure it didn't get missed.

 Danomi> http://lists.busybox.net/pipermail/buildroot/2012-April/053214.html

 Danomi> But in actuality, busybox does not execute scripts from those places. ?Rather,
 Danomi> the busybox change was to treat "post-up" and "pre-down" key words as aliases
 Danomi> for "up" and "down", just like the full-blown ifupdown-0.6.16. ?I.e., if you
 Danomi> search for the underlying "execute_all" operations in either busybox-1.21.0/
 Danomi> networking/ifupdown.c or in the upstream ifupdown, you will see that only
 Danomi> "pre-up", "up", "down, and "post-down" directory contents are executed, and
 Danomi> that "up" scripts are invoked after the up action has occurred, and the "down"
 Danomi> scripts are run before the down action has occurred - giving them the roles of
 Danomi> "post-up" and "pre-down".

 Danomi> I think having the extra two directories in the device table might mislead
 Danomi> people into thinking that scripts there will be executed. ?Or have I
 Danomi> misunderstood something? ?For sure, it's not executing scripts from those
 Danomi> places with busybox-1.21.1 ...

 Danomi> FYI, the busybox commit that added the "post-up" and "pre-down" support can be
 Danomi> reviewed at:

 Danomi> http://lists.busybox.net/pipermail/busybox-cvs/2012-April/033401.html

It looks like you're right. Gustavo?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] Do if-post-up.d and if-pre-down.d belong in the device table?
  2013-09-08 19:57 ` Peter Korsgaard
@ 2013-09-09 11:59   ` Gustavo Zacarias
  0 siblings, 0 replies; 3+ messages in thread
From: Gustavo Zacarias @ 2013-09-09 11:59 UTC (permalink / raw)
  To: buildroot

On 09/08/2013 04:57 PM, Peter Korsgaard wrote:

>  Danomi> I think having the extra two directories in the device table might mislead
>  Danomi> people into thinking that scripts there will be executed.  Or have I
>  Danomi> misunderstood something?  For sure, it's not executing scripts from those
>  Danomi> places with busybox-1.21.1 ...
> 
>  Danomi> FYI, the busybox commit that added the "post-up" and "pre-down" support can be
>  Danomi> reviewed at:
> 
>  Danomi> http://lists.busybox.net/pipermail/busybox-cvs/2012-April/033401.html
> 
> It looks like you're right. Gustavo?

At the time lacking those directories resulted in a warning/error on
ifup/ifdown calls, which we do for loopback on boot so it was ugly.
However the "feature" was removed in subsequent busybox versions so it's
no longer an issue with the versions we currently ship.
Regards.

Acked-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-09-09 11:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-31 17:59 [Buildroot] Do if-post-up.d and if-pre-down.d belong in the device table? Danomi Manchego
2013-09-08 19:57 ` Peter Korsgaard
2013-09-09 11:59   ` Gustavo Zacarias

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox