]> git.ipfire.org Git - people/ms/network.git/blobdiff - functions.device
hotplugging: Check if the device has vanished in the meantime.
[people/ms/network.git] / functions.device
index 238cb06aab7978372fd01d212b7344adfc612e94..09ba33ed648fc6b11145c7324b44eb6580876db9 100644 (file)
@@ -560,7 +560,9 @@ function device_hotplug() {
        shift
 
        assert isset device
-       assert device_exists ${device}
+
+       # Just check if the device has already vanished.
+       device_exists ${device} || return ${EXIT_ERROR}
 
        if ! device_is_free ${device}; then
                log ERROR "The device '${device}' is in use."