]> git.ipfire.org Git - people/ms/network.git/commitdiff
boot: Fix bringing up zones when system is booting
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 22 Sep 2018 12:05:46 +0000 (13:05 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 22 Sep 2018 12:06:21 +0000 (13:06 +0100)
An incorrect target was required and no zone was brought
up during boot.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne.fitzenreiter@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/hooks/zones/bridge
src/systemd/network@.service.in

index 893f4523587cefe697a0e48f8845960166b751c9..33d5378d9427de8cdc81c8c888119135aa0ba3c3 100644 (file)
@@ -138,12 +138,10 @@ hook_hotplug() {
                add)
                        # Handle ports of this zone that have just been added
                        if hotplug_event_interface_is_port_of_zone "${zone}"; then
-                               # Bring up the zone if it is enabled but not active, yet.
-                               if zone_is_enabled "${zone}" && ! zone_is_active "${zone}"; then
-                                       zone_start "${zone}"
+                               # Attach the device if the parent bridge is up
+                               if zone_is_active "${zone}"; then
+                                       hook_port_up "${zone}" "${INTERFACE}"
                                fi
-
-                               hook_port_up "${zone}" "${INTERFACE}"
                        fi
                        ;;
                remove)
index 340b19657f57af2c8208ee10930cc8431d6a1c48..e7d26d74bf91b726bab725bae65347da2e1491e4 100644 (file)
@@ -3,7 +3,6 @@ Description=Network Connectivity for zone %I
 After=firewall-init.service network-init.service
 Requires=firewall-init.service network-init.service
 Wants=network.target
-Before=network.target
 
 [Service]
 Type=oneshot
@@ -14,4 +13,4 @@ ExecReload=@sbindir@/network zone %I reload
 
 [Install]
 WantedBy=network.target
-Alias=network.target.wants/network@%i.service
+Alias=network.target.wants/network@%i.service multi-user.target.wants/network@%i.service