]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Add DEPARTED reason for when an interface is removed.
authorRoy Marples <roy@marples.name>
Thu, 6 Jun 2013 12:38:15 +0000 (12:38 +0000)
committerRoy Marples <roy@marples.name>
Thu, 6 Jun 2013 12:38:15 +0000 (12:38 +0000)
dhcpcd-run-hooks.8.in
dhcpcd.c

index af02431d829ed1edc1059f0ec77941872130a2f6..c8aca105bdc0c78a158e2705dee2c7de171d0d95 100644 (file)
@@ -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.
index 087e149b1164219491eb01d2abe1d37262caf021..7d95228f5c11640feb8d14bb725f2ca4a816f224 100644 (file)
--- 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;
        }