diff options
author | Jouke Witteveen <j.witteveen@gmail.com> | 2013-03-30 10:58:04 +0100 |
---|---|---|
committer | Jouke Witteveen <j.witteveen@gmail.com> | 2013-03-30 10:58:04 +0100 |
commit | 9ff72561e32ec6aa409f0c50757481a9032595ac (patch) | |
tree | 865e298400205e31be317f1f20eedb0fe1f10851 /src | |
parent | 9b5007b02a43ae0bce573d20eb7fedb1cac72fe6 (diff) | |
download | netctl-9ff72561e32ec6aa409f0c50757481a9032595ac.tar.gz netctl-9ff72561e32ec6aa409f0c50757481a9032595ac.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 |