]> git.ipfire.org Git - people/ms/network.git/commitdiff
Only enable auto-enabled zones on hotplug events
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 6 Sep 2014 08:42:07 +0000 (10:42 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 6 Sep 2014 08:42:07 +0000 (10:42 +0200)
src/udev/network-hotplug
src/udev/network-hotplug-serial

index df791d387c0e515ce25aba4e776ff0d4ed171cf7..7b664a9f23546b2154c0c197685083b1202b9ba1 100644 (file)
@@ -90,10 +90,10 @@ case "${ACTION}" in
                # If not, there is nothing to do.
                isset zone || exit ${EXIT_OK}
 
-               # If the zone is already up, we add the device
-               # to the zone.
-               if zone_is_up ${zone}; then
-                       zone_up ${zone}
+               # If the zone is already up or enabled for auto-start,
+               # we add the device to the zone.
+               if zone_is_up "${zone}" || zone_is_enabled "${zone}"; then
+                       zone_up "${zone}"
                fi
                ;;
 
index 61337022fd690e3244722d2d8d61898130e913ae..1dbe89fde91573f596d15836b4a290beb868c740 100644 (file)
@@ -90,7 +90,10 @@ case "${ACTION}" in
                isset sim_imsi || exit ${EXIT_OK}
 
                for zone in $(zones_get_all); do
-                       # XXX Check if the zone is enabled.
+                       # Skip zones that are not enabled for auto-start.
+                       if ! zone_is_enabled "${zone}"; then
+                               continue
+                       fi
 
                        # Skip unsupported hook types.
                        hook="$(zone_get_hook "${zone}")"