From: Roy Marples Date: Thu, 6 Jun 2013 12:38:15 +0000 (+0000) Subject: Add DEPARTED reason for when an interface is removed. X-Git-Tag: v6.0.0~43 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ce289a66faab77033b7c43592ad4d5c17c64b97c;p=thirdparty%2Fdhcpcd.git Add DEPARTED reason for when an interface is removed. --- diff --git a/dhcpcd-run-hooks.8.in b/dhcpcd-run-hooks.8.in index af02431d..c8aca105 100644 --- a/dhcpcd-run-hooks.8.in +++ b/dhcpcd-run-hooks.8.in @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 5, 2013 +.Dd June 6, 2013 .Dt DHCPCD-RUN-HOOKS 8 .Os .Sh NAME @@ -75,6 +75,8 @@ dhcpcd is starting up and any pre-initialisation should be done. .It Dv CARRIER dhcpcd has detected the carrier is up. This is generally just a notification and no action need be taken. +.It Dv DEPARTED +The interface has been removed. .It Dv INFORM | Dv INFORM6 dhcpcd informed a DHCP server about it's address and obtained other configuration details. diff --git a/dhcpcd.c b/dhcpcd.c index 087e149b..7d95228f 100644 --- a/dhcpcd.c +++ b/dhcpcd.c @@ -516,8 +516,10 @@ handle_interface(int action, const char *ifname) if (action == -1) { ifp = find_interface(ifname); - if (ifp != NULL) + if (ifp != NULL) { stop_interface(ifp); + script_runreason(ifp, "DEPARTED"); + } return; }