diff options
-rwxr-xr-x | src/netctl | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 |