Print a warning if openvpn/tunctl are missing
This commit is contained in:
parent
e14e78db16
commit
539c4e5872
@ -54,15 +54,18 @@ tuntap_pre_start()
|
|||||||
do_tunctl=true
|
do_tunctl=true
|
||||||
elif type openvpn >/dev/null 2>&1; then
|
elif type openvpn >/dev/null 2>&1; then
|
||||||
do_openvpn=true
|
do_openvpn=true
|
||||||
else
|
elif type tunctl >/dev/null 2>&1; then
|
||||||
do_tunctl=true
|
do_tunctl=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ${do_openvpn}; then
|
if ${do_openvpn}; then
|
||||||
openvpn --mktun --dev-type "${tuntap}" --dev "${IFACE}" \
|
openvpn --mktun --dev-type "${tuntap}" --dev "${IFACE}" \
|
||||||
${o_opts} >/dev/null
|
${o_opts} >/dev/null
|
||||||
else
|
elif ${do_tunctl}; then
|
||||||
tunctl ${t_opts} -t "${IFACE}" >/dev/null
|
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
|
fi
|
||||||
eend $? && _up && service_set_value tuntap "${tuntap}"
|
eend $? && _up && service_set_value tuntap "${tuntap}"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user