summaryrefslogtreecommitdiff
path: root/cloudinit/DataSourceNoCloud.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/DataSourceNoCloud.py')
-rw-r--r--cloudinit/DataSourceNoCloud.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/cloudinit/DataSourceNoCloud.py b/cloudinit/DataSourceNoCloud.py
index cd988d08..78c9c9c8 100644
--- a/cloudinit/DataSourceNoCloud.py
+++ b/cloudinit/DataSourceNoCloud.py
@@ -108,16 +108,10 @@ class DataSourceNoCloud(DataSource.DataSource):
# root=LABEL=uec-rootfs ro ds=nocloud
def parse_cmdline_data(ds_id,fill,cmdline=None):
if cmdline is None:
- if 'DEBUG_PROC_CMDLINE' in os.environ:
- cmdline = os.environ["DEBUG_PROC_CMDLINE"]
- else:
- cmdfp = open("/proc/cmdline")
- cmdline = cmdfp.read().strip()
- cmdfp.close()
- cmdline = " %s " % cmdline.lower()
-
- if not ( " %s " % ds_id in cmdline or " %s;" % ds_id in cmdline ):
- return False
+ cmdline = util.get_cmdline()
+
+ if not ( " %s " % ds_id in cmdline or " %s;" % ds_id in cmdline ):
+ return False
argline=""
# cmdline can contain: