Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re6stnet
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
re6stnet
Commits
09ec1327
Commit
09ec1327
authored
Sep 03, 2012
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix restarting in case of corrupted cache + small log fixes
parent
9a05367c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
8 deletions
+5
-8
re6st/plib.py
re6st/plib.py
+3
-6
re6stnet
re6stnet
+2
-2
No files found.
re6st/plib.py
View file @
09ec1327
...
...
@@ -21,9 +21,9 @@ def openvpn(iface, hello_interval, encrypt, *args, **kw):
]
+
list
(
args
)
if
not
encrypt
:
args
.
extend
([
'--cipher'
,
'none'
])
logging
.
trace
(
'%r'
,
args
)
logging
.
debug
(
'%r'
,
args
)
fd
=
os
.
open
(
os
.
path
.
join
(
log
,
'%s.log'
%
iface
),
os
.
O_WRONLY
|
os
.
O_CREAT
|
os
.
O_APPEND
)
os
.
O_WRONLY
|
os
.
O_CREAT
|
os
.
O_APPEND
,
0666
)
try
:
return
subprocess
.
Popen
(
args
,
stdout
=
fd
,
stderr
=
subprocess
.
STDOUT
,
**
kw
)
finally
:
...
...
@@ -31,7 +31,6 @@ def openvpn(iface, hello_interval, encrypt, *args, **kw):
def
server
(
iface
,
server_ip
,
ip_length
,
max_clients
,
dh_path
,
pipe_fd
,
port
,
proto
,
hello_interval
,
encrypt
,
*
args
,
**
kw
):
logging
.
debug
(
'Starting server...'
)
if
server_ip
:
script_up
=
'%s %s/%u'
%
(
ovpn_server
,
server_ip
,
64
)
else
:
...
...
@@ -50,7 +49,6 @@ def server(iface, server_ip, ip_length, max_clients, dh_path, pipe_fd, port, pro
def
client
(
iface
,
server_address
,
pipe_fd
,
hello_interval
,
encrypt
,
*
args
,
**
kw
):
logging
.
debug
(
'Starting client...'
)
remote
=
[
'--nobind'
,
'--client'
,
'--up'
,
ovpn_client
,
...
...
@@ -68,7 +66,6 @@ def client(iface, server_address, pipe_fd, hello_interval, encrypt, *args, **kw)
def
router
(
network
,
subnet
,
subnet_size
,
interface_list
,
wireless
,
hello_interval
,
verbose
,
pidfile
,
state_path
,
**
kw
):
logging
.
info
(
'Starting babel...'
)
args
=
[
'babeld'
,
'-C'
,
'redistribute local ip %s/%s le %s'
%
(
subnet
,
subnet_size
,
subnet_size
),
'-C'
,
'redistribute local deny'
,
...
...
@@ -103,5 +100,5 @@ def router(network, subnet, subnet_size, interface_list,
if
wireless
:
args
.
append
(
'-w'
)
args
=
args
+
interface_list
logging
.
trace
(
'%r'
,
args
)
logging
.
info
(
'%r'
,
args
)
return
subprocess
.
Popen
(
args
,
**
kw
)
re6stnet
View file @
09ec1327
...
...
@@ -143,7 +143,7 @@ def main():
interface_list
,
config
.
wireless
,
config
.
hello
,
config
.
babel_verb
,
config
.
babel_pidfile
,
os
.
path
.
join
(
config
.
state
,
'babeld.state'
),
stdout
=
os
.
open
(
os
.
path
.
join
(
config
.
log
,
'babeld.log'
),
os
.
O_WRONLY
|
os
.
O_CREAT
|
os
.
O_APPEND
),
stderr
=
subprocess
.
STDOUT
)
os
.
O_WRONLY
|
os
.
O_CREAT
|
os
.
O_APPEND
,
0666
),
stderr
=
subprocess
.
STDOUT
)
# main loop
try
:
...
...
@@ -191,7 +191,7 @@ def main():
try
:
sys
.
exitfunc
()
finally
:
os
.
execvp
(
sys
.
executable
,
sys
.
argv
)
os
.
execvp
(
sys
.
argv
[
0
]
,
sys
.
argv
)
except
KeyboardInterrupt
:
return
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment