summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2007-07-08 11:36:57 +0000
committerRoy Marples <uberlord@gentoo.org>2007-07-08 11:36:57 +0000
commit25763d5ca17fbb5bf3c9f1f9a4e423db476f9ad5 (patch)
treecd32fbb20a98942ebf426ec051fa17d8c1faff6d /net-misc/openvpn
parentFix fbsd, bug#184535, thanks to lavajoe (diff)
downloadhistorical-25763d5ca17fbb5bf3c9f1f9a4e423db476f9ad5.tar.gz
historical-25763d5ca17fbb5bf3c9f1f9a4e423db476f9ad5.tar.bz2
historical-25763d5ca17fbb5bf3c9f1f9a4e423db476f9ad5.zip
RE_ENTER config variable allows custom up/down scripts to re-enter openvpn. Should fix #133107.
Package-Manager: portage-2.1.3_rc6
Diffstat (limited to 'net-misc/openvpn')
-rw-r--r--net-misc/openvpn/ChangeLog7
-rw-r--r--net-misc/openvpn/Manifest24
-rw-r--r--net-misc/openvpn/files/openvpn-2.1.conf7
-rwxr-xr-xnet-misc/openvpn/files/openvpn-2.1.init6
4 files changed, 28 insertions, 16 deletions
diff --git a/net-misc/openvpn/ChangeLog b/net-misc/openvpn/ChangeLog
index 24b58dd90da4..5d6fb2886132 100644
--- a/net-misc/openvpn/ChangeLog
+++ b/net-misc/openvpn/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for net-misc/openvpn
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/ChangeLog,v 1.112 2007/06/29 09:17:36 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/openvpn/ChangeLog,v 1.113 2007/07/08 11:36:57 uberlord Exp $
+
+ 08 Jul 2007; Roy Marples <uberlord@gentoo.org> files/openvpn-2.1.conf,
+ files/openvpn-2.1.init:
+ RE_ENTER config variable allows custom up/down scripts to re-enter openvpn.
+ Should fix #133107.
*openvpn-2.1_rc4-r1 (29 Jun 2007)
diff --git a/net-misc/openvpn/Manifest b/net-misc/openvpn/Manifest
index 5e21615fd4b5..2e5750832321 100644
--- a/net-misc/openvpn/Manifest
+++ b/net-misc/openvpn/Manifest
@@ -14,14 +14,14 @@ AUX openvpn-2.0.7-persistent.patch 1857 RMD160 b3232feb19810ac405cd7af6bb692ed03
MD5 3960920a53d3398558b984d2952b6aa6 files/openvpn-2.0.7-persistent.patch 1857
RMD160 b3232feb19810ac405cd7af6bb692ed03f9c44c2 files/openvpn-2.0.7-persistent.patch 1857
SHA256 51de714f2191ac3ea59a7f7c5a0aa1c0bf15ee5d79ace10f2276d415cd0f59e0 files/openvpn-2.0.7-persistent.patch 1857
-AUX openvpn-2.1.conf 357 RMD160 3b5e920d6dae5de32c6cf92f808e9052ab65522b SHA1 79e0b3ef2eb3aeeaab832c192c20a922fecb8704 SHA256 73a80995c962e62fe84a99f8aa6f58b830e83701c59e5b0adf8137f8a85dae3c
-MD5 54a27e6777d939e2c8d8b1af4ff89e34 files/openvpn-2.1.conf 357
-RMD160 3b5e920d6dae5de32c6cf92f808e9052ab65522b files/openvpn-2.1.conf 357
-SHA256 73a80995c962e62fe84a99f8aa6f58b830e83701c59e5b0adf8137f8a85dae3c files/openvpn-2.1.conf 357
-AUX openvpn-2.1.init 3958 RMD160 d08fb38e578515795f61b5b6a92e61dd4d2042aa SHA1 497c70fbc1f35d43b03cde340214dd93d46c3106 SHA256 1bad8472acb9de1e4f325079c9b38f30cd1aa4a7979b379a6c8a8d42bacfd35b
-MD5 a8b90d0befdd4dbe72e6e2075023e0ba files/openvpn-2.1.init 3958
-RMD160 d08fb38e578515795f61b5b6a92e61dd4d2042aa files/openvpn-2.1.init 3958
-SHA256 1bad8472acb9de1e4f325079c9b38f30cd1aa4a7979b379a6c8a8d42bacfd35b files/openvpn-2.1.init 3958
+AUX openvpn-2.1.conf 712 RMD160 0361ea2ceef1256e0726c34aa73139ca91c28a08 SHA1 d2440bcbad3dda12d9264b6ebeb9469271f935e5 SHA256 20c66233746766a53a43a0bfdc8b688fcdb9a00659b116fac6cb8e293924895e
+MD5 945e64c8b2889367785512371e49432d files/openvpn-2.1.conf 712
+RMD160 0361ea2ceef1256e0726c34aa73139ca91c28a08 files/openvpn-2.1.conf 712
+SHA256 20c66233746766a53a43a0bfdc8b688fcdb9a00659b116fac6cb8e293924895e files/openvpn-2.1.conf 712
+AUX openvpn-2.1.init 3986 RMD160 5f25f5961fd13e40ea9746b566c5cfb689412061 SHA1 c24e3a87e1b81bb47d144b1b442d5c54e4f716a9 SHA256 323b10b115b4f8bf142d80b2b0ac8bf4b9496ed7d26b55836a332a0fb82fe53e
+MD5 2d31f3b59811d856b4b76b581d37a16e files/openvpn-2.1.init 3986
+RMD160 5f25f5961fd13e40ea9746b566c5cfb689412061 files/openvpn-2.1.init 3986
+SHA256 323b10b115b4f8bf142d80b2b0ac8bf4b9496ed7d26b55836a332a0fb82fe53e files/openvpn-2.1.init 3986
AUX openvpn.init 1461 RMD160 5b1e41f449e287fc2629c2ecef28f7437d10eb74 SHA1 756afc52a29aae1bc41e5eb43f5604e4d9e39112 SHA256 81782885fe6b65434404e4d5875071cb9a4c70914f25c71826290bb265ab109e
MD5 8f8bae9823ceafe8b9a1ac24bb4a23da files/openvpn.init 1461
RMD160 5b1e41f449e287fc2629c2ecef28f7437d10eb74 files/openvpn.init 1461
@@ -50,10 +50,10 @@ EBUILD openvpn-2.1_rc4.ebuild 4641 RMD160 aabca1049040fff4c187210fa85a403901ff4c
MD5 0e432cb63dbaa36f5cb3fdd60127b31d openvpn-2.1_rc4.ebuild 4641
RMD160 aabca1049040fff4c187210fa85a403901ff4cfd openvpn-2.1_rc4.ebuild 4641
SHA256 25265bc166a63ff0ba494edf45e6b5fd61f4dac5e79500108c44c46c41b0c71a openvpn-2.1_rc4.ebuild 4641
-MISC ChangeLog 17692 RMD160 487d18c24ee83f3b0b6082db976047c97b886abe SHA1 371a0cfd28bbce548533a3573bb67d92f24ee25f SHA256 47ee600cb0ec65fb542847c7e2c3cca99165c7a076e3d8b5d22a6251696e426d
-MD5 5b6a492e4d9f6f541e6b39d7a034d46c ChangeLog 17692
-RMD160 487d18c24ee83f3b0b6082db976047c97b886abe ChangeLog 17692
-SHA256 47ee600cb0ec65fb542847c7e2c3cca99165c7a076e3d8b5d22a6251696e426d ChangeLog 17692
+MISC ChangeLog 17892 RMD160 2cee63f018b5fa3ab3ed4b18b19a56774d1c5ce7 SHA1 4839ccaff4197e7990ea11e9b14ca10371ce2ff1 SHA256 3641bd62066c9749abf47b3a89864bbf864a8d869366d0f62588e9273adb9a3c
+MD5 3e03710317c465007a53ead8080b2a25 ChangeLog 17892
+RMD160 2cee63f018b5fa3ab3ed4b18b19a56774d1c5ce7 ChangeLog 17892
+SHA256 3641bd62066c9749abf47b3a89864bbf864a8d869366d0f62588e9273adb9a3c ChangeLog 17892
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.conf b/net-misc/openvpn/files/openvpn-2.1.conf
index 1ed477e6eab7..17c93dc07f31 100644
--- a/net-misc/openvpn/files/openvpn-2.1.conf
+++ b/net-misc/openvpn/files/openvpn-2.1.conf
@@ -4,3 +4,10 @@
# OpenVPN configuration looks like a client, but it's really a peer or
# something else. DETECT_CLIENT controls this behaviour.
DETECT_CLIENT="yes"
+
+# If DETECT_CLIENT is no and you have your own scripts to re-enter the openvpn
+# init script (ie, it first becomes "inactive" and the script then starts the
+# script again to make it "started") then you can state this below.
+# In other words, unless you understand service dependencies and are a
+# competent shell scripter, don't set this.
+RE_ENTER="no"
diff --git a/net-misc/openvpn/files/openvpn-2.1.init b/net-misc/openvpn/files/openvpn-2.1.init
index 52f111a86ed9..b61456334ae9 100755
--- a/net-misc/openvpn/files/openvpn-2.1.init
+++ b/net-misc/openvpn/files/openvpn-2.1.init
@@ -65,7 +65,7 @@ start() {
checkconfig || return 1
- local args="" client=false
+ local args="" reenter=${RE_ENTER:-no}
# 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
@@ -77,7 +77,7 @@ start() {
# which configures our DNS if any and marks us as up.
if [ "${DETECT_CLIENT:-yes}" = "yes" ] && \
grep -q "^[ \t]*remote[ \t].*" "${VPNCONF}" ; then
- client=true
+ reenter="yes"
args="${args} --nobind --up-delay --up-restart"
args="${args} --up /etc/openvpn/up.sh"
args="${args} --down-pre --down /etc/openvpn/down.sh"
@@ -104,7 +104,7 @@ start() {
grep -q "^[ \t]*group[ \t].*" "${VPNCONF}" || args="${args} --group openvpn"
fi
- ${client} && mark_service_inactive "${SVCNAME}"
+ [ "${reenter}" = "yes" ] && mark_service_inactive "${SVCNAME}"
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"