From b9ff681e3ed5efc0f8f76ce75d89b2214a6e68c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 6 May 2015 17:10:16 +0200 Subject: Separate initialisation Initialisation now can be executed without loop it self. --- scripts/boot.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'scripts/boot.py') diff --git a/scripts/boot.py b/scripts/boot.py index c8c9bea..bff70d9 100644 --- a/scripts/boot.py +++ b/scripts/boot.py @@ -5,24 +5,14 @@ import shutil import importlib import utils +import initialize from conf import conf from conf import sf from exceptions import MissingFile -def gen_nbscript(): - try: - os.remove(sf(conf.nbscript)) - except OSError: - pass - - with open(sf(conf.nbscript), 'w') as f: - f.write('# generated novaboot script. Please don\'t edit.\n') - f.write('load ' + sf(conf.linux_image) + ' console=ttyS0,115200\n') - f.write('load ' + sf(conf.initram) + '\n') - def boot(): if not os.path.isfile((conf.nbscript)): - gen_nbscript() + initialize.gen_nbscript() try: os.mkdir(sf(conf.output_folder)) except FileExistsError: @@ -41,6 +31,8 @@ def boot(): if line.startswith('lcp-output: '): output += line[12:] print(output) + + # TODO change data = bench.stdoutput(output) iteration = 0 -- cgit v1.2.3