From 48a3b4ca0ba55699825d6eabe75d843286c23545 Mon Sep 17 00:00:00 2001 From: Greg Padgett Date: Tue, 4 Jun 2013 20:42:55 -0400 Subject: support optical drives with dev node /dev/sr1 Extend a prior fix which helped discovery of media on systems using 2.6 kernels. /dev/sr0 covers only some of the use cases, /dev/sr1 is also common. --- cloudinit/sources/DataSourceConfigDrive.py | 1 + cloudinit/sources/DataSourceNoCloud.py | 1 + 2 files changed, 2 insertions(+) (limited to 'cloudinit/sources') 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")) -- cgit v1.2.3