diff options
author | Christian Ruppert <idl0r@gentoo.org> | 2011-09-16 23:47:20 +0200 |
---|---|---|
committer | Christian Ruppert <idl0r@gentoo.org> | 2011-09-16 23:48:44 +0200 |
commit | 539c4e58723fbd3b8ca9f30a09e99ddaf72c30b1 (patch) | |
tree | d0200867685dc60f99cfbd4c8ca36375409cad15 | |
parent | e14e78db16b8ce38235665ee52e3c13375e0d168 (diff) |
Print a warning if openvpn/tunctl are missing
-rw-r--r-- | net/tuntap.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/tuntap.sh b/net/tuntap.sh index 851a017b..14ffddb0 100644 --- a/net/tuntap.sh +++ b/net/tuntap.sh @@ -54,15 +54,18 @@ tuntap_pre_start() do_tunctl=true elif type openvpn >/dev/null 2>&1; then do_openvpn=true - else + elif type tunctl >/dev/null 2>&1; then do_tunctl=true fi if ${do_openvpn}; then openvpn --mktun --dev-type "${tuntap}" --dev "${IFACE}" \ ${o_opts} >/dev/null - else + elif ${do_tunctl}; then tunctl ${t_opts} -t "${IFACE}" >/dev/null + else + eerror "Neither openvpn nor tunctl has been found, please install" + eerror "either net-misc/openvpn or sys-apps/usermode-utilities." fi eend $? && _up && service_set_value tuntap "${tuntap}" } |