summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2013-03-30 10:58:04 +0100
committerRobbie Smith <zoqaeski@gmail.com>2013-04-08 06:43:55 +0200
commite34538b84fee1ba1b98952bb07f2343ea88141c1 (patch)
tree022752e78cfc8913abbd842ac5b07d132e4302d8 /src
parent1bb83f8bd73ebf86908685850c727d6786922cd4 (diff)
downloadnetctl-e34538b84fee1ba1b98952bb07f2343ea88141c1.tar.gz
netctl-e34538b84fee1ba1b98952bb07f2343ea88141c1.tar.xz
Support more interface types
This allows future connection types to use interfaces other than networking interfaces, for instance to use USB interfaces.
Diffstat (limited to 'src')
-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