From a34cd8759407dbcb5f80a5a5500bcca09206e278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 27 Apr 2015 21:34:45 +0200 Subject: Change boot.gen_nbscripts to support relative conf paths --- scripts/boot.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'scripts/boot.py') diff --git a/scripts/boot.py b/scripts/boot.py index 1f7e0f9..50e9f0c 100644 --- a/scripts/boot.py +++ b/scripts/boot.py @@ -5,17 +5,19 @@ import shutil import utils from conf import conf +from conf import sf from exceptions import MissingFile def gen_nbscript(): try: - os.remove(conf.nbscript) + os.remove(sf(conf.nbscript)) except OSError: pass - with open(conf.nbscript, 'w') as f: - f.write('load ' + conf.linux_image + ' console=ttyS0,115200\n') - f.write('load ' + conf.initram + '\n') + 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): -- cgit v1.2.3