Gentoo Archives: gentoo-commits

From: "Cedric Krier (cedk)" <cedk@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/openvpn/files: openvpn.init openvpn-2.1.init
Date: Sun, 28 Feb 2010 16:21:37
Message-Id: E1Nlltd-0001LM-EU@stork.gentoo.org
1 cedk 10/02/28 16:21:33
2
3 Modified: openvpn.init openvpn-2.1.init
4 Log:
5 Fix init scripts to work with tabs for bug #301619
6 (Portage version: 2.1.7.16/cvs/Linux i686)
7
8 Revision Changes Path
9 1.10 net-misc/openvpn/files/openvpn.init
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/files/openvpn.init?rev=1.10&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/files/openvpn.init?rev=1.10&content-type=text/plain
13 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/files/openvpn.init?r1=1.9&r2=1.10
14
15 Index: openvpn.init
16 ===================================================================
17 RCS file: /var/cvsroot/gentoo-x86/net-misc/openvpn/files/openvpn.init,v
18 retrieving revision 1.9
19 retrieving revision 1.10
20 diff -u -r1.9 -r1.10
21 --- openvpn.init 29 Jan 2008 15:07:36 -0000 1.9
22 +++ openvpn.init 28 Feb 2010 16:21:32 -0000 1.10
23 @@ -45,7 +45,7 @@
24 local args=""
25 # If the config file does not specify the cd option, we do
26 # But if we specify it, we override the config option which we do not want
27 - if ! grep -q "^[ \t]*cd[ \t].*" "${VPNCONF}" ; then
28 + if ! grep -q "^[ ]*cd[ ].*" "${VPNCONF}" ; then
29 args="${args} --cd ${VPNDIR}"
30 fi
31
32
33
34
35 1.17 net-misc/openvpn/files/openvpn-2.1.init
36
37 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/files/openvpn-2.1.init?rev=1.17&view=markup
38 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/files/openvpn-2.1.init?rev=1.17&content-type=text/plain
39 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/openvpn/files/openvpn-2.1.init?r1=1.16&r2=1.17
40
41 Index: openvpn-2.1.init
42 ===================================================================
43 RCS file: /var/cvsroot/gentoo-x86/net-misc/openvpn/files/openvpn-2.1.init,v
44 retrieving revision 1.16
45 retrieving revision 1.17
46 diff -u -r1.16 -r1.17
47 --- openvpn-2.1.init 10 Oct 2009 22:41:16 -0000 1.16
48 +++ openvpn-2.1.init 28 Feb 2010 16:21:32 -0000 1.17
49 @@ -69,7 +69,7 @@
50 local args="" reenter=${RE_ENTER:-no}
51 # If the config file does not specify the cd option, we do
52 # But if we specify it, we override the config option which we do not want
53 - if ! grep -q "^[ \t]*cd[ \t].*" "${VPNCONF}" ; then
54 + if ! grep -q "^[ ]*cd[ ].*" "${VPNCONF}" ; then
55 args="${args} --cd ${VPNDIR}"
56 fi
57
58 @@ -77,7 +77,7 @@
59 # When we get an authenticated packet from the peer then we run our script
60 # which configures our DNS if any and marks us as up.
61 if [ "${DETECT_CLIENT:-yes}" = "yes" ] && \
62 - grep -q "^[ \t]*remote[ \t].*" "${VPNCONF}" ; then
63 + grep -q "^[ ]*remote[ ].*" "${VPNCONF}" ; then
64 reenter="yes"
65 args="${args} --up-delay --up-restart"
66 args="${args} --script-security 2"
67 @@ -85,7 +85,7 @@
68 args="${args} --down-pre --down /etc/openvpn/down.sh"
69
70 # Warn about setting scripts as we override them
71 - if grep -Eq "^[ \t]*(up|down)[ \t].*" "${VPNCONF}" ; then
72 + if grep -Eq "^[ ]*(up|down)[ ].*" "${VPNCONF}" ; then
73 ewarn "WARNING: You have defined your own up/down scripts"
74 ewarn "As you're running as a client, we now force Gentoo specific"
75 ewarn "scripts to be run for up and down events."
76 @@ -95,15 +95,15 @@
77
78 # Warn about the inability to change ip/route/dns information when
79 # dropping privs
80 - if grep -q "^[ \t]*user[ \t].*" "${VPNCONF}" ; then
81 + if grep -q "^[ ]*user[ ].*" "${VPNCONF}" ; then
82 ewarn "WARNING: You are dropping root privileges!"
83 ewarn "As such openvpn may not be able to change ip, routing"
84 ewarn "or DNS configuration."
85 fi
86 else
87 # So we're a server. Run as openvpn unless otherwise specified
88 - grep -q "^[ \t]*user[ \t].*" "${VPNCONF}" || args="${args} --user openvpn"
89 - grep -q "^[ \t]*group[ \t].*" "${VPNCONF}" || args="${args} --group openvpn"
90 + grep -q "^[ ]*user[ ].*" "${VPNCONF}" || args="${args} --user openvpn"
91 + grep -q "^[ ]*group[ ].*" "${VPNCONF}" || args="${args} --group openvpn"
92 fi
93
94 # Ensure that our scripts get the PEER_DNS variable