summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRisto Oikarinen <zharalim@outlook.com>2019-04-09 18:05:24 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2019-04-09 18:05:24 +0000
commitb76714c355a87416f9f07156b0f025aceaca7296 (patch)
treed880ef7232aada6824e9dcc959b1c867a6cdb7b6 /tools
parentbdd9c0ac9bcd68ec1ac3b2038dad0ba3dbd83341 (diff)
downloadvyos-cloud-init-b76714c355a87416f9f07156b0f025aceaca7296.tar.gz
vyos-cloud-init-b76714c355a87416f9f07156b0f025aceaca7296.zip
Change DataSourceNoCloud to ignore file system label's case.
NoCloud data source now accepts both 'cidata' and 'CIDATA' as filesystem labels. This is similar to DataSourceConfigDrive's support for 'config-2' and 'CONFIG-2'.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ds-identify7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/ds-identify b/tools/ds-identify
index b78b2731..6518901e 100755
--- a/tools/ds-identify
+++ b/tools/ds-identify
@@ -620,7 +620,7 @@ dscheck_MAAS() {
}
dscheck_NoCloud() {
- local fslabel="cidata" d=""
+ local fslabel="cidata CIDATA" d=""
case " ${DI_KERNEL_CMDLINE} " in
*\ ds=nocloud*) return ${DS_FOUND};;
esac
@@ -632,9 +632,10 @@ dscheck_NoCloud() {
check_seed_dir "$d" meta-data user-data && return ${DS_FOUND}
check_writable_seed_dir "$d" meta-data user-data && return ${DS_FOUND}
done
- if has_fs_with_label "${fslabel}"; then
+ if has_fs_with_label $fslabel; then
return ${DS_FOUND}
fi
+
return ${DS_NOT_FOUND}
}
@@ -762,7 +763,7 @@ is_cdrom_ovf() {
# explicitly skip known labels of other types. rd_rdfe is azure.
case "$label" in
- config-2|CONFIG-2|rd_rdfe_stable*|cidata) return 1;;
+ config-2|CONFIG-2|rd_rdfe_stable*|cidata|CIDATA) return 1;;
esac
local idstr="http://schemas.dmtf.org/ovf/environment/1"