summaryrefslogtreecommitdiff
path: root/cloudinit/CloudConfig/cc_runcmd.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/CloudConfig/cc_runcmd.py')
-rw-r--r--cloudinit/CloudConfig/cc_runcmd.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/CloudConfig/cc_runcmd.py b/cloudinit/CloudConfig/cc_runcmd.py
index 97d21900..969f6394 100644
--- a/cloudinit/CloudConfig/cc_runcmd.py
+++ b/cloudinit/CloudConfig/cc_runcmd.py
@@ -21,7 +21,8 @@ import cloudinit.util as util
def handle(name,cfg,cloud,log,args):
if not cfg.has_key("runcmd"):
return
- outfile="%s/runcmd" % cloudinit.user_scripts_dir
+ outfile="%s/%s/runcmd" % \
+ (cloudinit.user_scripts_dir, cloud.get_instance_id())
content="#!/bin/sh\n"
escaped="%s%s%s%s" % ( "'", '\\', "'", "'" )