summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorJames Falcon <TheRealFalcon@users.noreply.github.com>2020-08-07 10:19:09 -0500
committerGitHub <noreply@github.com>2020-08-07 11:19:09 -0400
commitc068f992c3905d07732dafa6eb61c1ae3aa65916 (patch)
tree6a58935c6660b3446020d205f098f3aeee9377a2 /cloudinit
parentb2bf538b8c355b1bf04657fafc717ad20779e4a4 (diff)
downloadvyos-cloud-init-c068f992c3905d07732dafa6eb61c1ae3aa65916.tar.gz
vyos-cloud-init-c068f992c3905d07732dafa6eb61c1ae3aa65916.zip
Recognize LABEL_FATBOOT labels (#513)
Update DataSourceNoCloud and ds-identify to recognize LABEL_FATBOOT labels from blkid. Also updated associated tests. LP: #1841466
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/sources/DataSourceNoCloud.py1
-rw-r--r--cloudinit/util.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/cloudinit/sources/DataSourceNoCloud.py b/cloudinit/sources/DataSourceNoCloud.py
index e8856920..e408d730 100644
--- a/cloudinit/sources/DataSourceNoCloud.py
+++ b/cloudinit/sources/DataSourceNoCloud.py
@@ -41,6 +41,7 @@ class DataSourceNoCloud(sources.DataSource):
label_list = util.find_devs_with("LABEL=%s" % label.upper())
label_list.extend(util.find_devs_with("LABEL=%s" % label.lower()))
+ label_list.extend(util.find_devs_with("LABEL_FATBOOT=%s" % label))
devlist = list(set(fslist) & set(label_list))
devlist.sort(reverse=True)
diff --git a/cloudinit/util.py b/cloudinit/util.py
index 3c087176..624c560d 100644
--- a/cloudinit/util.py
+++ b/cloudinit/util.py
@@ -1112,6 +1112,7 @@ def close_stdin():
def find_devs_with_freebsd(criteria=None, oformat='device',
tag=None, no_cache=False, path=None):
+ devlist = []
if not criteria:
return glob.glob("/dev/msdosfs/*") + glob.glob("/dev/iso9660/*")
if criteria.startswith("LABEL="):