Commit 32d895c0 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

Changed steps in slapprepare

parent e945f936
...@@ -521,6 +521,17 @@ def slapprepare(): ...@@ -521,6 +521,17 @@ def slapprepare():
config= Config() config= Config()
config.setConfig(Parser(usage=usage).check_args()) config.setConfig(Parser(usage=usage).check_args())
# Install/update slapos
try :
_call(['zypper','addrepo', '-fc' ,'-n','"SlapOS Official repo"'
,'http://download.opensuse.org/repositories/home:/VIFIBnexedi/openSUSE_12.1/', 'slapos'])
except:
pass
_call(['zypper','--gpg-auto-import-keys','install','-fy','slapos.node'])
_call(['systemctl','stop','slapos-node.service'])
print "SlapOS has been updated"
if not config.update : if not config.update :
prepare_from_scratch(config) prepare_from_scratch(config)
...@@ -532,15 +543,6 @@ def slapprepare(): ...@@ -532,15 +543,6 @@ def slapprepare():
_call(['systemctl','enable','slapos-boot-dedicated.service']) _call(['systemctl','enable','slapos-boot-dedicated.service'])
_call(['systemctl','stop','slapos-boot-dedicated.service']) _call(['systemctl','stop','slapos-boot-dedicated.service'])
# Install/update slapos
try :
_call(['zypper','addrepo', '-fc' ,'-n','"SlapOS Official repo"'
,'http://download.opensuse.org/repositories/home:/VIFIBnexedi/openSUSE_12.1/', 'slapos'])
except:
pass
_call(['zypper','--gpg-auto-import-keys','install','-fy','slapos.node'])
_call(['systemctl','start','slapos-boot-dedicated.service']) _call(['systemctl','start','slapos-boot-dedicated.service'])
return_code = 0 return_code = 0
......
...@@ -44,7 +44,9 @@ SLAPOS_CONFIGURATION='%(slapos_configuration)s' ...@@ -44,7 +44,9 @@ SLAPOS_CONFIGURATION='%(slapos_configuration)s'
# Test ipv4/ipv6 connectivity and if not working use openvpn # Test ipv4/ipv6 connectivity and if not working use openvpn
# and wait for it to be ready # and wait for it to be ready
/etc/init.d/openvpn stop if [ ! -f $SLAPOS_CONFIGURATION/openvpn-needed ]; then
/etc/init.d/openvpn stop
fi
ping -c 2 $IPV4CHECK ping -c 2 $IPV4CHECK
while [ $? != 0 ]; do while [ $? != 0 ]; do
......
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