1
0
mirror of https://github.com/laurivosandi/certidude synced 2024-12-23 00:25:18 +00:00

Add routes for NetworkManager only if they have been specified

This commit is contained in:
Lauri Võsandi 2016-01-15 18:09:03 +02:00
parent 6bfa1ccf9c
commit 7cb9f04972

View File

@ -161,8 +161,9 @@ def certidude_request_spawn(fork):
config.set("ipv4", "method", "auto") config.set("ipv4", "method", "auto")
# Add routes, may need some more tweaking # Add routes, may need some more tweaking
for index, subnet in enumerate(services.get(endpoint, "route").split(","), start=1): if services.has_option(endpoint, "route"):
config.set("ipv4", "route%d" % index, subnet) for index, subnet in enumerate(services.get(endpoint, "route").split(","), start=1):
config.set("ipv4", "route%d" % index, subnet)
# Prevent creation of files with liberal permissions # Prevent creation of files with liberal permissions
os.umask(0o177) os.umask(0o177)