summaryrefslogtreecommitdiff
path: root/cloudinit/sources/DataSourceConfigDrive.py
diff options
context:
space:
mode:
authorPaul Querna <pquerna@apache.org>2014-01-09 21:14:51 +0000
committerPaul Querna <pquerna@apache.org>2014-01-09 21:14:51 +0000
commit66aa9826b818c3478516104b38039fecbd717b6b (patch)
treed0cd89f2fc6ede6716643239be2b0aeb6ff54217 /cloudinit/sources/DataSourceConfigDrive.py
parentb9314a18a052e934643c93b81dc938b3e5b69307 (diff)
downloadvyos-cloud-init-66aa9826b818c3478516104b38039fecbd717b6b.tar.gz
vyos-cloud-init-66aa9826b818c3478516104b38039fecbd717b6b.zip
Allow a Config Drive source on a partition, if the label matches.
Diffstat (limited to 'cloudinit/sources/DataSourceConfigDrive.py')
-rw-r--r--cloudinit/sources/DataSourceConfigDrive.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/cloudinit/sources/DataSourceConfigDrive.py b/cloudinit/sources/DataSourceConfigDrive.py
index 4f437244..2a244496 100644
--- a/cloudinit/sources/DataSourceConfigDrive.py
+++ b/cloudinit/sources/DataSourceConfigDrive.py
@@ -284,8 +284,10 @@ def find_candidate_devs():
# followed by fstype items, but with dupes removed
combined = (by_label + [d for d in by_fstype if d not in by_label])
- # We are looking for block device (sda, not sda1), ignore partitions
- combined = [d for d in combined if not util.is_partition(d)]
+ # We are looking for a block device or partition with necessary label or
+ # an unpartitioned block device.
+ combined = [d for d in combined
+ if d in by_label or not util.is_partition(d)]
return combined