diff options
author | Scott Moser <smoser@ubuntu.com> | 2018-05-09 20:08:53 -0600 |
---|---|---|
committer | Chad Smith <chad.smith@canonical.com> | 2018-05-09 20:08:53 -0600 |
commit | bde30070ec5f20aeb4d48cee8cf6c49b900ee311 (patch) | |
tree | 364aa9ef9c00e26e25eb007864a5002f2796134d | |
parent | 23a84d2ce4ec44a0a0c2edbc3b1948c59bb0afbb (diff) | |
download | vyos-cloud-init-bde30070ec5f20aeb4d48cee8cf6c49b900ee311.tar.gz vyos-cloud-init-bde30070ec5f20aeb4d48cee8cf6c49b900ee311.zip |
ds-identify: Remove dupe call to is_ds_enabled, improve debug message.
We had two calls to is_ds_enabled, and the debug message looked
something like this:
is_ds_enabled returned 1: ConfigDrive NoCloud
Now instead we have just one call, and the debug message like:
is_ds_enabled(IBMCloud) = true
-rwxr-xr-x | tools/ds-identify | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/ds-identify b/tools/ds-identify index a062e4d7..435a5bcb 100755 --- a/tools/ds-identify +++ b/tools/ds-identify @@ -641,9 +641,11 @@ check_configdrive_v2() { return ${DS_FOUND} fi - is_ds_enabled "IBMCloud" - debug 1 "is_ds_enabled returned $?: $DI_DSLIST" - is_ds_enabled "IBMCloud" && is_ibm_cloud && return ${DS_NOT_FOUND} + local ibm_enabled=false + is_ds_enabled "IBMCloud" && ibm_enabled=true + debug 1 "is_ds_enabled(IBMCloud) = $ibm_enabled." + [ "$ibm_enabled" = "true" ] && is_ibm_cloud && return ${DS_NOT_FOUND} + if has_fs_with_label CONFIG-2 config-2; then return ${DS_FOUND} fi |