summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-09-10 03:08:27 +0000
committerRoy Marples <uberlord@gentoo.org>2006-09-10 03:08:27 +0000
commit24172b41131f88cdb2cfb1c9702e62b6c05dbd3e (patch)
treef80797fe2d08d3a0882b9db98700da697c4c8ed5 /net-misc
parentKeyworded ~ia64 (diff)
downloadhistorical-24172b41131f88cdb2cfb1c9702e62b6c05dbd3e.tar.gz
historical-24172b41131f88cdb2cfb1c9702e62b6c05dbd3e.tar.bz2
historical-24172b41131f88cdb2cfb1c9702e62b6c05dbd3e.zip
Add FreeBSD support
Package-Manager: portage-2.1.1_rc1-r5
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/openvpn/ChangeLog5
-rw-r--r--net-misc/openvpn/Manifest16
-rwxr-xr-xnet-misc/openvpn/files/openvpn-2.1.init42
3 files changed, 47 insertions, 16 deletions
diff --git a/net-misc/openvpn/ChangeLog b/net-misc/openvpn/ChangeLog
index 4d1c89eaead6..8c7cc5ee3c1b 100644
--- a/net-misc/openvpn/ChangeLog
+++ b/net-misc/openvpn/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for net-misc/openvpn
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/ChangeLog,v 1.91 2006/07/08 08:22:06 corsair Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/ChangeLog,v 1.92 2006/09/10 03:08:27 uberlord Exp $
+
+ 10 Sep 2006; Roy Marples <uberlord@gentoo.org> files/openvpn-2.1.init:
+ Add FreeBSD support
08 Jul 2006; Markus Rothe <corsair@gentoo.org> openvpn-2.0.6.ebuild:
Stable on ppc64
diff --git a/net-misc/openvpn/Manifest b/net-misc/openvpn/Manifest
index 7365b3b524b8..ed4a87fe807c 100644
--- a/net-misc/openvpn/Manifest
+++ b/net-misc/openvpn/Manifest
@@ -6,10 +6,10 @@ AUX openvpn-2.0.4-darwin.patch 717 RMD160 66aa5ea349329cf3e6089aa75eb7c80e0d2106
MD5 9f0fcb64287dc55bb770ca86415e5cdd files/openvpn-2.0.4-darwin.patch 717
RMD160 66aa5ea349329cf3e6089aa75eb7c80e0d21063b files/openvpn-2.0.4-darwin.patch 717
SHA256 ad70b77c10bb57a07af3d512e953fc8b5a07108df5bf9795e0cb12e1ba2b2136 files/openvpn-2.0.4-darwin.patch 717
-AUX openvpn-2.1.init 3170 RMD160 12dbbb897e363dd45fbba0c66e77ebefa948bc03 SHA1 f54ba0ffa43fbb87ce966f259f6aa5bc60ecf430 SHA256 49723cbbf39365495c5c321ee4f7115811100aa4c1269e8365f008cb90d3921d
-MD5 70a750dd7358761e64aeadd92c35acd0 files/openvpn-2.1.init 3170
-RMD160 12dbbb897e363dd45fbba0c66e77ebefa948bc03 files/openvpn-2.1.init 3170
-SHA256 49723cbbf39365495c5c321ee4f7115811100aa4c1269e8365f008cb90d3921d files/openvpn-2.1.init 3170
+AUX openvpn-2.1.init 4023 RMD160 d78f4303114dfa6516cd0108a1060b7d755c2c4a SHA1 9cc186562c56a578eee929d472f9cfd63434621c SHA256 1611b1fe36c0248990aae2f95adcec036198f70cb71e15e3053c762e202b0fcf
+MD5 b52427ba1e6df212d3e2a45c54f388c7 files/openvpn-2.1.init 4023
+RMD160 d78f4303114dfa6516cd0108a1060b7d755c2c4a files/openvpn-2.1.init 4023
+SHA256 1611b1fe36c0248990aae2f95adcec036198f70cb71e15e3053c762e202b0fcf files/openvpn-2.1.init 4023
AUX openvpn.init 1457 RMD160 233cf3953ee341f025a9bc863e7ad0fac91369ab SHA1 b625de203e357b5e2a8d276c36e2fecc31946c1a SHA256 bfb8ac1e2d8a7d2a0313741e45f6e14ab4076581ba4166709dbe05ab110cb80a
MD5 35cb74384ed5232c68dbf19f9107bd8e files/openvpn.init 1457
RMD160 233cf3953ee341f025a9bc863e7ad0fac91369ab files/openvpn.init 1457
@@ -33,10 +33,10 @@ EBUILD openvpn-2.1_beta14.ebuild 4198 RMD160 ea68edb2496bb772d7e5248bdff7b507f59
MD5 732ac0e7ab0e5e61b682f18ab72a8855 openvpn-2.1_beta14.ebuild 4198
RMD160 ea68edb2496bb772d7e5248bdff7b507f59f04bc openvpn-2.1_beta14.ebuild 4198
SHA256 6906cd804695c03af240f9ee37091b940aa640cb01059304846493f564ca2c0a openvpn-2.1_beta14.ebuild 4198
-MISC ChangeLog 14014 RMD160 e3d971e03216c403a8c8fc9376a7d321f06d9395 SHA1 1eae1228dc833d7ffbc7527bc8a5c8f1e0599d10 SHA256 a571f4f079f3c7cbf03c4cd61cf004ac8f8344678b4e93cea2d5c268ff556657
-MD5 c886360c8ff185302327d86e9b8b274e ChangeLog 14014
-RMD160 e3d971e03216c403a8c8fc9376a7d321f06d9395 ChangeLog 14014
-SHA256 a571f4f079f3c7cbf03c4cd61cf004ac8f8344678b4e93cea2d5c268ff556657 ChangeLog 14014
+MISC ChangeLog 14111 RMD160 59c1d98d21cead218205ac599c19ccc5ab9ce6ad SHA1 754e6ba9b946332142e3fd8eaeff78c3d9a77ad2 SHA256 70ad2a27faacd64dfb168ab9fbc5a1d88825d865ae47539b03a1eb3843c2f6d6
+MD5 4580689fcfe27ae599bfa6687899632d ChangeLog 14111
+RMD160 59c1d98d21cead218205ac599c19ccc5ab9ce6ad ChangeLog 14111
+SHA256 70ad2a27faacd64dfb168ab9fbc5a1d88825d865ae47539b03a1eb3843c2f6d6 ChangeLog 14111
MISC metadata.xml 440 RMD160 120089ec9c799161dfeeacd9a3adfc40b4317f06 SHA1 23d2975ef0f709dc2e754a5867942e679ee60740 SHA256 408ca4fc4f58fa21e629582d0a44a759f9695a018479d70efbd3338b6bdbcfd6
MD5 62aa0438042b29eba4a6afd971037761 metadata.xml 440
RMD160 120089ec9c799161dfeeacd9a3adfc40b4317f06 metadata.xml 440
diff --git a/net-misc/openvpn/files/openvpn-2.1.init b/net-misc/openvpn/files/openvpn-2.1.init
index f20bbb17febd..c3ac461fc81d 100755
--- a/net-misc/openvpn/files/openvpn-2.1.init
+++ b/net-misc/openvpn/files/openvpn-2.1.init
@@ -17,15 +17,43 @@ depend() {
}
checkconfig() {
- if [[ ! -e /dev/net/tun ]]; then
- if ! modprobe tun ; then
- eerror "TUN/TAP support is not available in this kernel"
- return 1
+ # Linux has good dynamic tun/tap creation
+ if [[ $(uname) == "Linux" ]] ; then
+ 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
+ return 0
+ fi
+
+ # Other OS's don't, so we rely on a pre-configured interface
+ # per vpn instance
+ local ifname=
+ if [[ ! $'\n'$(<"${VPNCONF}") =~ \
+ $'\n'"[[:space:]]*dev[[:space:]]*([^[[:space:]]*)" ]] ; then
+ eerror "You need to specify the interface that this openvpn" \
+ "instance should use" \
+ "by using the dev option in ${VPNCONF}"
+ return 1
fi
- if [[ ! -e "${VPNCONF}" ]]; then
- eend 1 "${VPNCONF} does not exist"
+ ifname="${BASH_REMATCH[1]}"
+ if ! ifconfig "${ifname}" &>/dev/null ; then
+ # Try and create it
+ echo > /dev/"${ifname}" &>/dev/null
+ fi
+ if ! ifconfig "${ifname}" &>/dev/null ; then
+ eerror "${VPNCONF} requires interface ${ifname}" \
+ "but that does not exist"
return 1
fi
}
@@ -99,4 +127,4 @@ stop() {
eend $?
}
-# vim: ts=4
+# vim: set ts=4 :