diff options
author | Scott Moser <smoser@nelson> | 2010-01-06 00:42:33 -0500 |
---|---|---|
committer | Scott Moser <smoser@nelson> | 2010-01-06 00:42:33 -0500 |
commit | d9451ac2d25078dd6b2964bae8a1807474271923 (patch) | |
tree | 6ed1d0641d1b13294d5b2ea8de61a347c3ede0fb /ec2init | |
parent | e6cb87fa2499e4066b3e4959ea903952b4e3723e (diff) | |
download | vyos-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__.py | 11 |
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() + |