]> git.ipfire.org Git - network.git/commitdiff
Shut down devices before we remove them
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 2 Feb 2018 11:33:51 +0000 (11:33 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 2 Feb 2018 11:33:51 +0000 (11:33 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/functions/functions.device

index 4fc91294162ffe625cc577db2b063f88ce43354e..cb4911f9ae7a6ec04888fe675a57c707c940d9c5 100644 (file)
@@ -77,6 +77,9 @@ device_delete() {
        # Nothing to do, it device does not exist.
        device_exists ${device} || return ${EXIT_OK}
 
+       # Shut down device before we delete it
+       device_set_down "${device}"
+
        # Delete the device.
        cmd_quiet ip link delete ${device}
        local ret=$?