[arch-projects] [netcfg] [PATCH 4/8] systemd: Add conflicts to net-auto-wired and net-auto-wireless in the generated ethernet and wireless units

Thomas Bächler thomas at archlinux.org
Fri Oct 26 17:09:14 EDT 2012


---
 systemd/netcfg-generator | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/systemd/netcfg-generator b/systemd/netcfg-generator
index 8b6f3af..4bd6292 100755
--- a/systemd/netcfg-generator
+++ b/systemd/netcfg-generator
@@ -41,12 +41,20 @@ list_profiles | while read p; do
                 systemd_devices+=("sys-subsystem-net-devices-${iface}.device")
             done
             ;;
-        ethernet|pppoe|wireless)
+        ethernet)
+            systemd_devices+=("sys-subsystem-net-devices-${INTERFACE}.device")
+            extra_deps+=("Conflicts=net-auto-wired@${INTERFACE}.service")
+            ;;
+        pppoe)
             systemd_devices+=("sys-subsystem-net-devices-${INTERFACE}.device")
             ;;
         vlan)
             systemd_devices+=("sys-subsystem-net-devices-${VLAN_PHYS_DEV}.device")
             ;;
+        wireless)
+            systemd_devices+=("sys-subsystem-net-devices-${INTERFACE}.device")
+            extra_deps+=("Conflicts=net-auto-wireless@${INTERFACE}.service")
+            ;;
     esac
     [[ ${#systemd_devices[@]} > 0 ]] && extra_deps+=("BindsTo=${systemd_devices[*]}" "After=${systemd_devices[*]}")
     write_template "${p}" "${extra_deps[@]}" > "$1/netcfg-profile-${p}.service"
-- 
1.8.0



More information about the arch-projects mailing list