summaryrefslogtreecommitdiff
path: root/cloudinit/sources
diff options
context:
space:
mode:
authorGreg Padgett <gpadgett@redhat.com>2013-06-07 13:39:04 -0400
committerScott Moser <smoser@ubuntu.com>2013-06-07 13:39:04 -0400
commit812f82e7b3bad3f8127face552c76ef974b54661 (patch)
tree5ae31d68b66e5292cbe9fc34b509326802d153d4 /cloudinit/sources
parent233761a7fe4a995fbe0c8f65f512172a2b64090c (diff)
parent48a3b4ca0ba55699825d6eabe75d843286c23545 (diff)
downloadvyos-cloud-init-812f82e7b3bad3f8127face552c76ef974b54661.tar.gz
vyos-cloud-init-812f82e7b3bad3f8127face552c76ef974b54661.zip
ConfigDrive, Nocloud: Apply the "poke /dev/sr0" approach to /dev/sr1 also
Optical drives may show up in RHEL systems as /dev/sr1; this extends a prior fix to handle that use case. It's applicable to systems with 2.6 kernels where blkid needs a little prodding. If we have to go back here with '/dev/sr2', then we should probably come up with a fix that doesn't doesn't make us come back again.
Diffstat (limited to 'cloudinit/sources')
-rw-r--r--cloudinit/sources/DataSourceConfigDrive.py1
-rw-r--r--cloudinit/sources/DataSourceNoCloud.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/cloudinit/sources/DataSourceConfigDrive.py b/cloudinit/sources/DataSourceConfigDrive.py
index d3443c2b..835f2a9a 100644
--- a/cloudinit/sources/DataSourceConfigDrive.py
+++ b/cloudinit/sources/DataSourceConfigDrive.py
@@ -260,6 +260,7 @@ def find_candidate_devs():
# Query optical drive to get it in blkid cache for 2.6 kernels
util.find_devs_with(path="/dev/sr0")
+ util.find_devs_with(path="/dev/sr1")
by_fstype = (util.find_devs_with("TYPE=vfat") +
util.find_devs_with("TYPE=iso9660"))
diff --git a/cloudinit/sources/DataSourceNoCloud.py b/cloudinit/sources/DataSourceNoCloud.py
index 01c99028..084abca7 100644
--- a/cloudinit/sources/DataSourceNoCloud.py
+++ b/cloudinit/sources/DataSourceNoCloud.py
@@ -89,6 +89,7 @@ class DataSourceNoCloud(sources.DataSource):
if label is not None:
# Query optical drive to get it in blkid cache for 2.6 kernels
util.find_devs_with(path="/dev/sr0")
+ util.find_devs_with(path="/dev/sr1")
fslist = util.find_devs_with("TYPE=vfat")
fslist.extend(util.find_devs_with("TYPE=iso9660"))