diff options
author | Kali Kaneko <kali@leap.se> | 2014-05-08 10:41:55 -0500 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2014-05-12 11:25:29 -0500 |
commit | 745ae7f55836ff331d9176b52cc98df451a3c2ef (patch) | |
tree | 837b6756dbc12da22857ad4c28a91dcc79739967 /pkg/linux | |
parent | d68e35c611638a57bbda99665f9685e5ae6fcd23 (diff) |
change paths for installing the latest helpers
Diffstat (limited to 'pkg/linux')
-rwxr-xr-x | pkg/linux/bitmask-root | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/pkg/linux/bitmask-root b/pkg/linux/bitmask-root index 78503af9..6942b99b 100755 --- a/pkg/linux/bitmask-root +++ b/pkg/linux/bitmask-root @@ -57,10 +57,12 @@ BITMASK_CHAIN = "bitmask" IP = "/bin/ip" IPTABLES = "/sbin/iptables" IP6TABLES = "/sbin/ip6tables" -RESOLVCONF = "/sbin/resolvconf" + +RESOLVCONF_SYSTEM_BIN = "/sbin/resolvconf" +RESOLVCONF_LEAP_BIN = "/usr/local/sbin/leap-resolvconf" + OPENVPN_USER = "nobody" OPENVPN_GROUP = "nogroup" - LEAPOPENVPN = "LEAPOPENVPN" OPENVPN_SYSTEM_BIN = "/usr/sbin/openvpn" # Debian location OPENVPN_LEAP_BIN = "/usr/sbin/leap-openvpn" # installed by bundle @@ -513,6 +515,21 @@ def openvpn_stop(args): ## +def get_resolvconf_bin(): + """ + Return the path for either the system resolvconf or the one the + bundle has put there. + """ + if os.path.isfile(RESOLVCONF_SYSTEM_BIN): + return RESOLVCONF_SYSTEM_BIN + + # the bundle option should be removed from the debian package. + if os.path.isfile(RESOLVCONF_LEAP_BIN): + return RESOLVCONF_LEAP_BIN + +RESOLVCONF = get_resolvconf_bin() + + class NameserverSetter(Daemon): """ A daemon that will add leap nameserver inside the tunnel |