mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-10-10 09:09:50 +00:00
Minor fixes regarding coding style
This commit is contained in:
parent
bd9b45cadb
commit
2fbea1f656
1 changed files with 7 additions and 14 deletions
|
@ -30,26 +30,19 @@ class Waagent(Task):
|
||||||
from bootstrapvz.common.tools import log_check_call
|
from bootstrapvz.common.tools import log_check_call
|
||||||
import os
|
import os
|
||||||
waagent_version = info.manifest.system['waagent']['version']
|
waagent_version = info.manifest.system['waagent']['version']
|
||||||
waagent_file = 'WALinuxAgent-'+waagent_version+'.tar.gz'
|
waagent_file = 'WALinuxAgent-' + waagent_version + '.tar.gz'
|
||||||
waagent_url = 'https://github.com/Azure/WALinuxAgent/archive/' + waagent_file
|
waagent_url = 'https://github.com/Azure/WALinuxAgent/archive/' + waagent_file
|
||||||
log_check_call(['/usr/bin/wget', '-P', info.root, waagent_url])
|
log_check_call(['/usr/bin/wget', '-P', info.root, waagent_url])
|
||||||
import os.path
|
import os.path
|
||||||
waagent_directory = os.path.join(info.root, 'root')
|
waagent_directory = os.path.join(info.root, 'root')
|
||||||
log_check_call(['/bin/tar', 'xaf',
|
log_check_call(['/bin/tar', 'xaf', os.path.join(info.root, waagent_file), '-C', waagent_directory])
|
||||||
os.path.join(info.root, waagent_file),
|
|
||||||
'-C', waagent_directory])
|
|
||||||
os.remove(os.path.join(info.root, waagent_file))
|
os.remove(os.path.join(info.root, waagent_file))
|
||||||
waagent_script = '/root/WALinuxAgent-WALinuxAgent-' + \
|
waagent_script = '/root/WALinuxAgent-WALinuxAgent-' + waagent_version + '/waagent'
|
||||||
waagent_version + '/waagent'
|
log_check_call(['chroot', info.root, 'cp', waagent_script, '/usr/sbin/waagent'])
|
||||||
log_check_call(['chroot', info.root,
|
log_check_call(['chroot', info.root, 'chmod', '755', '/usr/sbin/waagent'])
|
||||||
'cp',waagent_script, '/usr/sbin/waagent'])
|
log_check_call(['chroot', info.root, '/usr/sbin/waagent', '-install'])
|
||||||
log_check_call(['chroot', info.root,
|
|
||||||
'chmod','755','/usr/sbin/waagent'])
|
|
||||||
log_check_call(['chroot', info.root,
|
|
||||||
'/usr/sbin/waagent','-install'])
|
|
||||||
import os.path
|
import os.path
|
||||||
if info.manifest.system['waagent'].get('conf', False):
|
if info.manifest.system['waagent'].get('conf', False):
|
||||||
if os.path.isfile(info.manifest.system['waagent']['conf']):
|
if os.path.isfile(info.manifest.system['waagent']['conf']):
|
||||||
log_check_call(['cp', info.manifest.system['waagent']['conf'],
|
log_check_call(['cp', info.manifest.system['waagent']['conf'],
|
||||||
os.path.join(info.root,'etc/waagent.conf')])
|
os.path.join(info.root,'etc/waagent.conf')])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue