summaryrefslogtreecommitdiff
path: root/ec2init
diff options
context:
space:
mode:
authorScott Moser <smoser@nelson>2010-01-06 00:42:33 -0500
committerScott Moser <smoser@nelson>2010-01-06 00:42:33 -0500
commitd9451ac2d25078dd6b2964bae8a1807474271923 (patch)
tree6ed1d0641d1b13294d5b2ea8de61a347c3ede0fb /ec2init
parente6cb87fa2499e4066b3e4959ea903952b4e3723e (diff)
downloadvyos-cloud-init-d9451ac2d25078dd6b2964bae8a1807474271923.tar.gz
vyos-cloud-init-d9451ac2d25078dd6b2964bae8a1807474271923.zip
add initctl_emit and defines for different data locations
Diffstat (limited to 'ec2init')
-rw-r--r--ec2init/__init__.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/ec2init/__init__.py b/ec2init/__init__.py
index b34f15cc..05404c3a 100644
--- a/ec2init/__init__.py
+++ b/ec2init/__init__.py
@@ -22,7 +22,11 @@ from configobj import ConfigObj
import boto.utils
-cachedir = '/var/lib/cloud/data/cache'
+datadir = '/var/lib/cloud/data'
+cachedir = datadir + '/cache'
+user_data = datadir + '/user-data.txt'
+user_data_raw = datadir + '/user-data.raw'
+user_config = datadir + '/user-config.txt'
import DataSourceEc2
@@ -52,7 +56,6 @@ class EC2Init:
for source in self.datasource_list:
try:
- print "trying + %s" % source
s = source()
if s.get_data():
self.datasource = s
@@ -70,3 +73,7 @@ class EC2Init:
return True
return False
+ def initctl_emit(self):
+ import subprocess
+ subprocess.Popen(['initctl', 'CFG_FILE=%s' % user_config]).communicate()
+