/[smecontribs]/rpms/smeserver-openvpn-bridge/contribs8/smeserver-openvpn-bridge-2.0-templates_cleanup.patch
ViewVC logotype

Contents of /rpms/smeserver-openvpn-bridge/contribs8/smeserver-openvpn-bridge-2.0-templates_cleanup.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Sun Mar 3 21:14:34 2013 UTC (11 years, 8 months ago) by unnilennium
Branch: MAIN
CVS Tags: smeserver-openvpn-bridge-2_0-49_el5_sme, smeserver-openvpn-bridge-2_0-55_el5_sme, smeserver-openvpn-bridge-2_0-48_el5_sme, smeserver-openvpn-bridge-2_0-56_el5_sme, smeserver-openvpn-bridge-2_0-51_el5_sme, smeserver-openvpn-bridge-2_0-52_el5_sme, smeserver-openvpn-bridge-2_0-53_el5_sme, smeserver-openvpn-bridge-2_0-54_el5_sme, smeserver-openvpn-bridge-2_0-47_el5_sme, smeserver-openvpn-bridge-2_0-50_el5_sme, HEAD
Error occurred while calculating annotation data.
Initial import

1 diff -Nur -x '*.orig' -x '*.rej' smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/10dev mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/10dev
2 --- smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/10dev 2008-12-03 14:34:53.000000000 +0100
3 +++ mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/10dev 2010-10-19 09:32:32.000000000 +0200
4 @@ -1,20 +1,23 @@
5 # Virtual Interface Configuration
6 {
7 - my $OUT='';
8 - my $protocol = ${'openvpn-bridge'}{protocol} || 'udp';
9 - my $port='';
10 - if ($protocol eq 'udp'){
11 - $port = ${'openvpn-bridge'}{UDPPort} || '1194';
12 - }
13 - if ($protocol eq 'tcp'){
14 - $port = ${'openvpn-bridge'}{TCPPort} || '1194';
15 - $protocol = 'tcp-server';
16 - }
17 - my $tapIf = ${'openvpn-bridge'}{tapIf} || 'tap0';
18 -
19 - $OUT .= "port $port\n";
20 + my $OUT='';
21 + my $protocol = ${'openvpn-bridge'}{protocol} || 'udp';
22 + my $port='';
23 + if ($protocol eq 'udp'){
24 + $port = ${'openvpn-bridge'}{UDPPort} || '1194';
25 + }
26 + if ($protocol eq 'tcp'){
27 + $port = ${'openvpn-bridge'}{TCPPort} || '1194';
28 + $protocol = 'tcp-server';
29 + }
30 + my $tapIf = ${'openvpn-bridge'}{tapIf} || 'tap0';
31 +
32 +$OUT .=<<"HERE";
33 +
34 +port $port
35 +proto $protocol
36 +dev $tapIf
37 +
38 +HERE
39
40 - $OUT .= "proto $protocol\n";
41 - $OUT .= "dev $tapIf\n";
42 - $OUT .= '';
43 }
44 diff -Nur -x '*.orig' -x '*.rej' smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/30cert mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/30cert
45 --- smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/30cert 2008-12-10 00:15:12.000000000 +0100
46 +++ mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/30cert 2010-10-19 09:29:55.000000000 +0200
47 @@ -3,15 +3,14 @@
48 ca pub/cacert.pem
49 cert pub/cert.pem
50 key priv/key.pem
51 +tls-server
52
53 {
54 -if (-e "/etc/openvpn/bridge/priv/takey.pem" && !-z "/etc/openvpn/bridge/priv/takey.pem"){
55 - $OUT .=<<"END";
56 -tls-server
57 -tls-auth priv/takey.pem 0
58
59 -END
60 -}
61 +$OUT .= "tls-auth priv/takey.pem 0\n" if
62 + (-e "/etc/openvpn/bridge/priv/takey.pem" &&
63 + !-z "/etc/openvpn/bridge/priv/takey.pem");
64 +
65 }
66
67 # CRL file for certificates verification
68 diff -Nur -x '*.orig' -x '*.rej' smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/40userAuth mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/40userAuth
69 --- smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/40userAuth 2010-10-19 09:39:57.000000000 +0200
70 +++ mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/40userAuth 2010-10-19 09:33:42.000000000 +0200
71 @@ -1,11 +1,11 @@
72 # Plugin for user-auth
73 {
74 - my $userAuth = ${'openvpn-bridge'}{userAuth} || 'CrtWithPass';
75 - if ($userAuth eq 'CrtWithPass'){
76 - my $plugin_dir = (-d "/usr/share/openvpn/plugin/lib") ?
77 - '/usr/share/openvpn/plugin/lib':'/usr/lib/openvpn/plugin/lib';
78 - $OUT .= "plugin ".$plugin_dir."/openvpn-auth-pam.so login\n";
79 - }
80 + my $userAuth = ${'openvpn-bridge'}{userAuth} || 'CrtWithPass';
81 + if ($userAuth eq 'CrtWithPass'){
82 + my $plugin_dir = (-d "/usr/share/openvpn/plugin/lib") ?
83 + '/usr/share/openvpn/plugin/lib':'/usr/lib/openvpn/plugin/lib';
84 + $OUT .= "plugin ".$plugin_dir."/openvpn-auth-pam.so login\n";
85 + }
86 $OUT .= '';
87 }
88
89 diff -Nur -x '*.orig' -x '*.rej' smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/50server_mode mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/50server_mode
90 --- smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/50server_mode 2007-01-29 15:07:46.000000000 +0100
91 +++ mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/50server_mode 2010-10-19 09:34:25.000000000 +0200
92 @@ -1,9 +1,9 @@
93 # Server mode
94 {
95 - my $OUT = '';
96 - my $ip = $LocalIP;
97 - my $netmask = $LocalNetmask;
98 - my $min = ${'openvpn-bridge'}{startPool};
99 - my $max = ${'openvpn-bridge'}{endPool};
100 - $OUT = "server-bridge $ip $netmask $min $max\n";
101 + my $OUT = '';
102 + my $ip = $LocalIP;
103 + my $netmask = $LocalNetmask;
104 + my $min = ${'openvpn-bridge'}{startPool} || '';
105 + my $max = ${'openvpn-bridge'}{endPool} || '';
106 + $OUT = "server-bridge $ip $netmask $min $max\n";
107 }
108 diff -Nur -x '*.orig' -x '*.rej' smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/60options mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/60options
109 --- smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/60options 2010-10-19 09:39:57.000000000 +0200
110 +++ mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/60options 2010-10-19 09:37:41.000000000 +0200
111 @@ -11,13 +11,13 @@
112
113 use esmith::NetworksDB;
114 my $ndb = esmith::NetworksDB->open_ro() ||
115 - die('Can not open Networks DB');
116 + die('Can not open Networks DB');
117
118 my @networks = $ndb->networks();
119
120 if ($proto eq 'tcp'){
121 - $mtuTest = 'disabled';
122 - $fragment = '';
123 + $mtuTest = 'disabled';
124 + $fragment = '';
125 }
126
127 $OUT .=<<"HERE";
128 @@ -29,43 +29,41 @@
129 HERE
130
131 foreach my $network (@networks) {
132 - if ($network->prop('Router')) {
133 - $OUT .= sprintf("push \"route %s %s %s\"\n",
134 - $network->key(),
135 - $network->prop('Mask'),
136 - $network->prop('Router')
137 - );
138 - }
139 -
140 + if ($network->prop('Router')) {
141 + $OUT .= sprintf("push \"route %s %s %s\"\n",
142 + $network->key(),
143 + $network->prop('Mask'),
144 + $network->prop('Router')
145 + );
146 + }
147 }
148
149 -if ($redirectGW eq 'allways'){
150 - $OUT .= "push \"redirect-gateway def1\"\n";
151 +if ($redirectGW eq 'always'){
152 + $OUT .= "push \"redirect-gateway def1\"\n";
153 }
154
155 if ($mtuTest eq 'enabled'){
156 - $OUT .= "mtu-test\n";
157 + $OUT .= "mtu-test\n";
158 }
159 elsif (($mtuTest eq 'disabled')){
160 - if ($tunMtu ne ''){
161 - $OUT .= "tun-mtu $tunMtu\n";
162 - }
163 - if (($proto eq 'udp') && ($fragment ne '')){
164 - $OUT .= "fragment $fragment\nmssfix\n";
165 - }
166 + if ($tunMtu ne ''){
167 + $OUT .= "tun-mtu $tunMtu\n";
168 + }
169 + if (($proto eq 'udp') && ($fragment ne '')){
170 + $OUT .= "fragment $fragment\nmssfix\n";
171 + }
172 }
173
174 if ($cipher ne 'auto'){
175 - $OUT .= "cipher $cipher\n";
176 + $OUT .= "cipher $cipher\n";
177 }
178
179 if ($duplicate eq 'enabled'){
180 - $OUT .= "duplicate-cn\n";
181 + $OUT .= "duplicate-cn\n";
182 }
183
184 }
185
186 -reneg-sec 3600
187 nice 5
188 passtos
189
190 diff -Nur -x '*.orig' -x '*.rej' smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/70management mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/70management
191 --- smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/70management 2008-12-03 15:51:59.000000000 +0100
192 +++ mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/70management 2010-10-19 09:38:46.000000000 +0200
193 @@ -1,10 +1,7 @@
194 # Management interface
195 {
196 - my $management = ${'openvpn-bridge'}{'management'} || 'localhost:11194:password';
197 - my @param = split(/:/,$management);
198 - my $host = $param[0];
199 - my $port = $param[1];
200 - my $pass = $param[2];
201 + my $management = ${'openvpn-bridge'}{'management'} || 'localhost:11194:password';
202 + my ($host,$port,$pass) = split(/:/,$management);
203 $OUT ="management $host $port management-pass.txt\n";
204
205 }
206 diff -Nur -x '*.orig' -x '*.rej' smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/80clients mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/80clients
207 --- smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/80clients 2010-10-19 09:39:57.000000000 +0200
208 +++ mezzanine_patched_smeserver-openvpn-bridge-2.0/root/etc/e-smith/templates/etc/openvpn/bridge/openvpn.conf/80clients 2010-10-19 09:39:36.000000000 +0200
209 @@ -1,27 +1,27 @@
210 # Clients options
211 {
212 - my $OUT = '';
213 - my $maxClient = ${'openvpn-bridge'}{maxClients} || '20';
214 - my $clientToClient = ${'openvpn-bridge'}{clientToClient} || 'disabled';
215 - my $compLzo = ${'openvpn-bridge'}{compLzo} || 'enabled';
216 - my $configRequired = ${'openvpn-bridge'}{ConfigRequired} || 'disabled';
217 + my $OUT = '';
218 + my $maxClient = ${'openvpn-bridge'}{maxClients} || '20';
219 + my $clientToClient = ${'openvpn-bridge'}{clientToClient} || 'disabled';
220 + my $compLzo = ${'openvpn-bridge'}{compLzo} || 'enabled';
221 + my $configRequired = ${'openvpn-bridge'}{ConfigRequired} || 'disabled';
222
223 - if ($clientToClient eq 'enabled'){
224 - $OUT .= "client-to-client\n";
225 - }
226 + if ($clientToClient eq 'enabled'){
227 + $OUT .= "client-to-client\n";
228 + }
229
230 - $OUT .= "client-config-dir ccd\n";
231 + $OUT .= "client-config-dir ccd\n";
232
233 - if ($configRequired eq 'enabled'){
234 - $OUT .= 'ccd-exclusive\n';
235 - }
236 + if ($configRequired eq 'enabled'){
237 + $OUT .= 'ccd-exclusive\n';
238 + }
239
240 - $OUT .= "max-clients $maxClient\n";
241 + $OUT .= "max-clients $maxClient\n";
242
243 - if ( $compLzo eq 'enabled'){
244 - $OUT .= "comp-lzo adaptive\n";
245 - $OUT .= "push \"comp-lzo adaptive\"\n";
246 - }
247 - $OUT .= '';
248 + if ( $compLzo eq 'enabled'){
249 + $OUT .= "comp-lzo adaptive\n";
250 + $OUT .= "push \"comp-lzo adaptive\"\n";
251 + }
252 + $OUT .= '';
253 }
254

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed