summaryrefslogtreecommitdiffstats
path: root/src/netctl
diff options
context:
space:
mode:
Diffstat (limited to 'src/netctl')
-rwxr-xr-xsrc/netctl5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/netctl b/src/netctl
index c8703c6..4441838 100755
--- a/src/netctl
+++ b/src/netctl
@@ -110,9 +110,10 @@ unit_enable() {
echo -e "\n[Unit]" >> "$unit"
[[ -n $Description ]] && echo "Description=$Description" >> "$unit"
if [[ -n ${BindsToInterfaces=$Interface} ]]; then
- printf 'BindsTo=sys-subsystem-net-devices-%s.device\n' \
+ : ${InterfaceRoot=sys/subsystem/net/devices/}
+ printf "BindsTo=$(sd_escape "$InterfaceRoot")%s.device\n" \
$(sd_escape "${BindsToInterfaces[@]}") >> "$unit"
- printf 'After=sys-subsystem-net-devices-%s.device\n' \
+ printf "After=$(sd_escape "$InterfaceRoot")%s.device\n" \
$(sd_escape "${BindsToInterfaces[@]}") >> "$unit"
fi
if [[ -n $After ]]; then