i think i'm all ready for a 1.0 release...

This commit is contained in:
brent s
2017-05-07 12:55:30 -04:00
parent a28121cbab
commit 0a99af21ee
4 changed files with 46 additions and 3 deletions

View File

@@ -286,9 +286,11 @@ class aif(object):
aifdict['system']['locale'] = False
aifdict['system']['kbd'] = False
aifdict['system']['chrootpath'] = False
for i in ('locale', 'timezone', 'kbd', 'chrootpath'):
aifdict['system']['reboot'] = False
for i in ('locale', 'timezone', 'kbd', 'chrootpath', 'reboot'):
if i in xmlobj.find('system').attrib:
aifdict['system'][i] = xmlobj.find('system').attrib[i]
aifdict['system']['reboot'] = aifdict['system']['reboot'].lower() in ('true', '1')
# And now services...
if xmlobj.find('system/service') is None:
aifdict['system']['services'] = False
@@ -949,7 +951,8 @@ def main():
with open(logfile, 'a') as log:
pprint.pprint(instconf, stream = log)
runInstall(instconf)
#subprocess.run(['reboot']) # We should probably leave this up to operators?
if instconf['system']['reboot']:
subprocess.run(['reboot'])
if __name__ == "__main__":
main()