Make sure we remove openvpn file AFTER slapos installation.

SlapOS package will readd it.
parent c0198103
...@@ -286,12 +286,6 @@ def slapserver(config): ...@@ -286,12 +286,6 @@ def slapserver(config):
os.chown(ssh_key_path, uid, gid) os.chown(ssh_key_path, uid, gid)
os.chmod(ssh_key_path, 0600) os.chmod(ssh_key_path, 0600)
# Put file to force VPN if user asked
if not config.force_vpn :
if not dry_run:
_call(['rm','-f',
os.path.join(config.slapos_configuration,'openvpn-needed')])
# Put file to force VPN if user asked # Put file to force VPN if user asked
if config.force_slapcontainer : if config.force_slapcontainer :
if not dry_run: if not dry_run:
...@@ -321,6 +315,7 @@ def slapserver(config): ...@@ -321,6 +315,7 @@ def slapserver(config):
print "Removing %r" % path print "Removing %r" % path
if not dry_run: if not dry_run:
os.remove(path) os.remove(path)
finally: finally:
print "SlapOS Image configuration: DONE" print "SlapOS Image configuration: DONE"
return 0 return 0
...@@ -562,6 +557,10 @@ def slapprepare(): ...@@ -562,6 +557,10 @@ def slapprepare():
configureNtp() configureNtp()
# Remove use of openvpn if not explicitely defined
if not config.force_vpn and not config.dry_run:
os.remove(os.path.join(config.slapos_configuration, 'openvpn-needed'))
# Enable and run slapos-boot-dedicated.service # Enable and run slapos-boot-dedicated.service
_call(['systemctl','enable','slapos-boot-dedicated.service']) _call(['systemctl','enable','slapos-boot-dedicated.service'])
_call(['systemctl','start','slapos-boot-dedicated.service']) _call(['systemctl','start','slapos-boot-dedicated.service'])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment