[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] Cause udhcpc to return with failure when script fails
From:       Denys Vlasenko <vda.linux () googlemail ! com>
Date:       2017-11-23 16:00:56
Message-ID: CAK1hOcP9x=gajVzgjJpn5XACaMRk4=qgf9ArV-+_MxHBNUcRaQ () mail ! gmail ! com
[Download RAW message or body]

On Thu, Nov 23, 2017 at 11:37 AM, Fabien Lahoudere
<fabien.lahoudere@collabora.co.uk> wrote:
> Udhcpc uses scripts to perform many system dependent tasks. The return value
> of these scripts isn't checked and udhcpc will continue on assuming that
> they've worked.
>
> It may also be advantage to be able to abort should certain situations
> arise. In our case, we implement a basic RFC5227 check using scripts and we
> wish for DHCP configuration to abort when certain circumstances are met.
>
> Return an error so that the udhcpc caller knows the scripts have failed.

Would it work if the script would just kill the parent, a-la

        kill $PPID

If necessary, also issue a command which prevent udhcpc to restart,
if it is run under a service monitor. For example, "sv o ."
for a runit-based service monitoring.
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic