From c20494cde76f70f4897aad62e7843ecea0163412 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Thu, 30 Aug 2007 14:32:20 +0000 Subject: [PATCH] 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 --- lib/backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/backend.py b/lib/backend.py index fea9da975..7d38b9184 100644 --- a/lib/backend.py +++ b/lib/backend.py @@ -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, instance.name, real_os_dev.dev_path, real_swap_dev.dev_path, logfile) -- GitLab