From e34538b84fee1ba1b98952bb07f2343ea88141c1 Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Sat, 30 Mar 2013 10:58:04 +0100 Subject: Support more interface types This allows future connection types to use interfaces other than networking interfaces, for instance to use USB interfaces. --- src/netctl | 5 +++-- 1 file 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 -- cgit v1.2.3-24-g4f1b