diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-02-03 10:11:11 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-02-03 10:11:11 +0000 |
commit | 9f750544a956d862d37472e9b8f406d613cc381a (patch) | |
tree | 857b032d5e0323d5a22af96468963b8f43d29aff /testing/openvpn/openvpn.initd | |
parent | 49900c76bb6afaddf29553c0e8b9b7b4708a2122 (diff) | |
download | aports-9f750544a956d862d37472e9b8f406d613cc381a.tar.bz2 aports-9f750544a956d862d37472e9b8f406d613cc381a.tar.xz |
main/openvpn: upgrade to 2.1.1 (moved from testing)
Diffstat (limited to 'testing/openvpn/openvpn.initd')
-rw-r--r-- | testing/openvpn/openvpn.initd | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/testing/openvpn/openvpn.initd b/testing/openvpn/openvpn.initd deleted file mode 100644 index 7e0e3eb9ef..0000000000 --- a/testing/openvpn/openvpn.initd +++ /dev/null @@ -1,63 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -VPNDIR="/etc/openvpn" -VPN="${SVCNAME#*.}" -if [ -n "${VPN}" ] && [ "${SVCNAME}" != "openvpn" ]; then - VPNPID="/var/run/openvpn.${VPN}.pid" -else - VPNPID="/var/run/openvpn.pid" -fi -VPNCONF="${VPNDIR}/${VPN}.conf" - -depend() { - need localmount net - before netmount - after bootmisc firewall -} - -checktundevice() { - if [ ! -e /dev/net/tun ]; then - if ! modprobe tun ; then - eerror "TUN/TAP support is not available in this kernel" - return 1 - fi - fi - if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then - ebegin "Detected broken /dev/net/tun symlink, fixing..." - rm -f /dev/net/tun - ln -s /dev/misc/net/tun /dev/net/tun - eend $? - fi -} - -start() { - ebegin "Starting ${SVCNAME}" - - checktundevice || return 1 - - if [ ! -e "${VPNCONF}" ]; then - eend 1 "${VPNCONF} does not exist" - return 1 - fi - - local args="" - # If the config file does not specify the cd option, we do - # But if we specify it, we override the config option which we do not want - if ! grep -q "^[ \t]*cd[ \t].*" "${VPNCONF}" ; then - args="${args} --cd ${VPNDIR}" - fi - - start-stop-daemon --start --exec /usr/sbin/openvpn --pidfile "${VPNPID}" \ - -- --config "${VPNCONF}" --writepid "${VPNPID}" --daemon ${args} - eend $? "Check your logs to see why startup failed" -} - -stop() { - ebegin "Stopping ${SVCNAME}" - start-stop-daemon --stop --exec /usr/sbin/openvpn --pidfile "${VPNPID}" - eend $? -} - -# vim: ts=4 |