Skip to content
Snippets Groups Projects
Commit 38c69944 authored by Nadav Har'El's avatar Nadav Har'El Committed by Pekka Enberg
Browse files

run.py: without -e, revert to the default command line.


As issue #128 explains, it is annoying that once the "-e" option was used
in run.py, it overrides the default command line, so that running run.py
again without -e reruns the same modified command line, and not the default
one as usual.

This simple patch changes this behavior: On every run of run.py, the command
line is set - if "-e" is given it is set to the given command line, but if
"-e" is absent, the command line is reset to the default one. This is
basically the behavior that people always wanted from run.py.

This patch, and the behavior it performs, are much simpler than any of
the alternatives proposed in issue #128.

Please don't complain that this can only be used for development, and not
for EC2, for creating images to distribute, and so on. After all, this is a
patch to *run.py*, and it is obviously not relevant to anyone who is running
an OSv image not through run.py. This patch only makes run.py more convenient
to use.

Fixes #128.

Signed-off-by: default avatarNadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
parent b52e67ef
No related branches found
No related tags found
No related merge requests found
......@@ -26,8 +26,8 @@ def cleanups():
def set_imgargs(options):
if (not options.execute):
return
with open ("build/%s/cmdline" % (options.opt_path), "r") as cmdline:
options.execute = cmdline.read()
args = ["setargs", options.image_file, options.execute]
subprocess.call(["scripts/imgedit.py"] + args)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment