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.
This commit is contained in:
Greg Padgett
2013-06-07 13:39:04 -04:00
committed by Scott Moser
2 changed files with 2 additions and 0 deletions

View File

@@ -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"))

View File

@@ -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"))