summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2010-06-18 00:23:25 -0400
committerScott Moser <smoser@ubuntu.com>2010-06-18 00:23:25 -0400
commit17fabe47dcbbe6b2180e73cac6211f7394d61a8a (patch)
tree9601bf8d16d19584f1a03749cb1e69965ab23148 /tools
parent6cdd4bf0a05d90e1e5b9c7b9b3c9f5c251c0a652 (diff)
downloadvyos-cloud-init-17fabe47dcbbe6b2180e73cac6211f7394d61a8a.tar.gz
vyos-cloud-init-17fabe47dcbbe6b2180e73cac6211f7394d61a8a.zip
add 'cloud-boothook' type
if user data is of type text/cloud-boothook, or begins with #cloud-boothook, then assume it to be code to be executed. Boothooks are a very simple format. Basically, its a one line header ('#cloud-config\n') and then executable payload. The executable payload is written to a file, then that file is executed at the time it is read. The file is left in /var/lib/cloud/data/boothooks There is no "first-time-only" protection. If running only once is desired, the boothook must handle that itself.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/write-mime-multipart3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/write-mime-multipart b/tools/write-mime-multipart
index d7ce0992..6466c3ff 100755
--- a/tools/write-mime-multipart
+++ b/tools/write-mime-multipart
@@ -25,7 +25,8 @@ starts_with_mappings={
'#!' : 'text/x-shellscript',
'#cloud-config' : 'text/cloud-config',
'#upstart-job' : 'text/upstart-job',
- '#part-handler' : 'text/part-handler'
+ '#part-handler' : 'text/part-handler',
+ '#cloud-boothook' : 'text/cloud-boothook'
}
def get_type(fname,deftype):