diff options
author | Jouke Witteveen <j.witteveen@gmail.com> | 2013-03-30 10:58:04 +0100 |
---|---|---|
committer | Robbie Smith <zoqaeski@gmail.com> | 2013-04-08 06:43:55 +0200 |
commit | e34538b84fee1ba1b98952bb07f2343ea88141c1 (patch) | |
tree | 022752e78cfc8913abbd842ac5b07d132e4302d8 /src | |
parent | 1bb83f8bd73ebf86908685850c727d6786922cd4 (diff) | |
download | netctl-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-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 |