[netctl] netctl-ifplugd@.service does not properly handle interfaces that are part of a bridge
Task Info (Flyspray) | |
---|---|
Opened By | Nathaniel Harward (nharward) |
Task ID | 36353 |
Type | Bug Report |
Project | Arch Linux |
Category | Arch Projects |
Version | None |
OS | All |
Opened | 2013-08-01 01:21:34 UTC |
Status | Assigned |
Assignee | Jouke Witteveen (jouke) |
Details
Description:
As part of setting up a QEMU instance I created the following profile in /etc/netctl/bridge:
Description="Bridge connection" Interface=br0 Connection=bridge BindsToInterfaces=(eth0) IP=dhcp
Enabling the netctl-ifplugd@eth0.service fails as /etc/ifplugd/netctl.action only pays attention to ethernet connections. The following patch against the current Git repo (HEAD is currently at daf19502 as of time of writing) seems to resolve the problem (sorry if my shell scripting is ugly):
diff --git a/src/ifplugd.action b/src/ifplugd.action
index c87ac0c..6d87c6c 100755
--- a/src/ifplugd.action
+++ b/src/ifplugd.action
@@ -20,7 +20,7 @@ case "$2" in
(
echo "Reading profile '$profile'"
source "PROFILE_DIR/
profile"
-
[[ "$Interface" == "$1" && "$Connection" == "ethernet" ]] || continue
-
[[ "$Interface" == "$1" && "$Connection" == "ethernet" ]] || [[ "$Connection" == "bridge" && "$1" == "$(for iface in "${BindsToInterfaces[@]}"; do test "${iface}" == "$1" && echo "${iface}" && break; done)" ]] || continue is_yes "${AutoWired:-no}" && exit 1 # user preferred AUTO profile [[ "$IP" == "dhcp" ]] && exit 2 # dhcp profile exit 3 # static profile
With this patch I can plug/unplug my eth0 cable and ifplugd correctly starts and stops the "bridge" profile.
Additional info:
- package version(s) - 1.2-1
Steps to reproduce:
- Create a bridge profile as in my example above, matching to the actual bridge and physical interfaces on the system
- Disable all netctl profiles
- As root run "systemctl start netctl-ifplugd@eth0.service" (replace eth0 with actual physical interface if not eth0)
- Running "journalctl -f" or "systemctl status netctl-ifplugd@eth0.service" should show that it failed
Steps to fix:
- Apply patch above to /etc/ifplugd/netctl.action
- Re-run step 3 above
- Job status should have succeeded and the bridge should be up