summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2007-06-29 09:17:37 +0000
committerRoy Marples <uberlord@gentoo.org>2007-06-29 09:17:37 +0000
commit078da9cb4701b4cb6c638ef6e9e617ae0e8d5d62 (patch)
tree1c9cb74ab2bac4a24a6ce8ebd246ae89752facb1 /net-misc/openvpn/files
parentremove gcc masks (diff)
downloadhistorical-078da9cb4701b4cb6c638ef6e9e617ae0e8d5d62.tar.gz
historical-078da9cb4701b4cb6c638ef6e9e617ae0e8d5d62.tar.bz2
historical-078da9cb4701b4cb6c638ef6e9e617ae0e8d5d62.zip
DETECT_CLIENT config directive now controls init script behaviour, #181000.
IPv6 support added, #183457 thanks to Marcel Pennewiß. Package-Manager: portage-2.1.3_rc5
Diffstat (limited to 'net-misc/openvpn/files')
-rw-r--r--net-misc/openvpn/files/digest-openvpn-2.1_rc4-r16
-rw-r--r--net-misc/openvpn/files/openvpn-2.1.conf6
-rwxr-xr-xnet-misc/openvpn/files/openvpn-2.1.init3
3 files changed, 14 insertions, 1 deletions
diff --git a/net-misc/openvpn/files/digest-openvpn-2.1_rc4-r1 b/net-misc/openvpn/files/digest-openvpn-2.1_rc4-r1
new file mode 100644
index 000000000000..56dcf25ffe7f
--- /dev/null
+++ b/net-misc/openvpn/files/digest-openvpn-2.1_rc4-r1
@@ -0,0 +1,6 @@
+MD5 225d07591c239977d874fa3e7b495506 openvpn-2.1-udp6.patch.bz2 16625
+RMD160 58f7fa1e9eebdfb267782f409b162e84f227faf8 openvpn-2.1-udp6.patch.bz2 16625
+SHA256 e98bd77e3098a203b23dde34847ba9647f8f0c75d432559d1c3fb1e9ada66322 openvpn-2.1-udp6.patch.bz2 16625
+MD5 9fffc0aa0f797b612fa4f52b1e92197b openvpn-2.1_rc4.tar.gz 803125
+RMD160 d9843c2fb6fda64b5cf9474f42b36068bb4cd845 openvpn-2.1_rc4.tar.gz 803125
+SHA256 5d14e101c40e396250727fae7ee9ab734edd4e6e7f55b8209e0e215423775ff3 openvpn-2.1_rc4.tar.gz 803125
diff --git a/net-misc/openvpn/files/openvpn-2.1.conf b/net-misc/openvpn/files/openvpn-2.1.conf
new file mode 100644
index 000000000000..1ed477e6eab7
--- /dev/null
+++ b/net-misc/openvpn/files/openvpn-2.1.conf
@@ -0,0 +1,6 @@
+# OpenVPN can run in many modes. Most people will want the init script
+# to automatically detect the mode and try and apply a good default
+# configuration and setup scripts. However, there are cases where the
+# OpenVPN configuration looks like a client, but it's really a peer or
+# something else. DETECT_CLIENT controls this behaviour.
+DETECT_CLIENT="yes"
diff --git a/net-misc/openvpn/files/openvpn-2.1.init b/net-misc/openvpn/files/openvpn-2.1.init
index a7ce284d3b79..52f111a86ed9 100755
--- a/net-misc/openvpn/files/openvpn-2.1.init
+++ b/net-misc/openvpn/files/openvpn-2.1.init
@@ -75,7 +75,8 @@ start() {
# We mark the service as inactive and then start it.
# When we get an authenticated packet from the peer then we run our script
# which configures our DNS if any and marks us as up.
- if grep -q "^[ \t]*remote[ \t].*" "${VPNCONF}" ; then
+ if [ "${DETECT_CLIENT:-yes}" = "yes" ] && \
+ grep -q "^[ \t]*remote[ \t].*" "${VPNCONF}" ; then
client=true
args="${args} --nobind --up-delay --up-restart"
args="${args} --up /etc/openvpn/up.sh"