aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-04-27 21:34:45 +0200
committerKarel Kočí <cynerd@email.cz>2015-04-27 21:34:45 +0200
commita34cd8759407dbcb5f80a5a5500bcca09206e278 (patch)
treecf33185301e1062773f30ac753b5a79693c215f5 /scripts
parent1a898f0d9ed617026ad50d6bc61fdee919326e9e (diff)
downloadlinux-conf-perf-a34cd8759407dbcb5f80a5a5500bcca09206e278.tar.gz
linux-conf-perf-a34cd8759407dbcb5f80a5a5500bcca09206e278.tar.bz2
linux-conf-perf-a34cd8759407dbcb5f80a5a5500bcca09206e278.zip
Change boot.gen_nbscripts to support relative conf paths
Diffstat (limited to 'scripts')
-rw-r--r--scripts/boot.py10
1 files changed, 6 insertions, 4 deletions
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):