Commit c20494cd authored by Iustin Pop's avatar Iustin Pop
Browse files

Add a safety check to the backend.AddOSToInstance

This changes a ';' to '&&' to make sure we run the create script from
the correct directory.

Reviewed-by: imsnah
parent 130e907e
......@@ -400,7 +400,7 @@ def AddOSToInstance(instance, os_disk, swap_disk):
if not os.path.exists(constants.LOG_OS_DIR):
os.mkdir(constants.LOG_OS_DIR, 0750)
command = utils.BuildShellCmd("cd %s; %s -i %s -b %s -s %s &>%s",
command = utils.BuildShellCmd("cd %s && %s -i %s -b %s -s %s &>%s",
inst_os.path, create_script,,
real_os_dev.dev_path, real_swap_dev.dev_path,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment