diff options
author | Scott Moser <smoser@brickies.net> | 2017-04-24 11:54:14 -0400 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2017-04-24 11:54:14 -0400 |
commit | 513e99e049eab4acea14e187f59d760adc755b40 (patch) | |
tree | 4544112ae3ed8c096094e1e0af45a1deb705c294 /tools/ds-identify | |
parent | d16632ad8dfd1844d265d93ab00b54d419626019 (diff) | |
download | vyos-cloud-init-513e99e049eab4acea14e187f59d760adc755b40.tar.gz vyos-cloud-init-513e99e049eab4acea14e187f59d760adc755b40.zip |
nova-lxd: read product_name from environment, not platform.
Apparently signals were crossed when this implementation was done.
Cloud-init was reading 'platform' in the environment of pid 1, but
nova-lxd was setting 'product_name'.
The fix is being made here in cloud-init to instead read product_name.
LP: #1685810
Diffstat (limited to 'tools/ds-identify')
-rwxr-xr-x | tools/ds-identify | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/ds-identify b/tools/ds-identify index a40b14d4..a43b1291 100755 --- a/tools/ds-identify +++ b/tools/ds-identify @@ -92,7 +92,7 @@ DI_DMI_PRODUCT_UUID="" DI_FS_LABELS="" DI_KERNEL_CMDLINE="" DI_VIRT="" -DI_PID_1_PLATFORM="" +DI_PID_1_PRODUCT_NAME="" DI_UNAME_KERNEL_NAME="" DI_UNAME_KERNEL_RELEASE="" @@ -362,9 +362,9 @@ read_datasource_list() { return 0 } -read_pid1_platform() { - local oifs="$IFS" out="" tok="" key="" val="" platform="${UNAVAILABLE}" - cached "${DI_PID_1_PLATFORM}" && return +read_pid1_product_name() { + local oifs="$IFS" out="" tok="" key="" val="" product_name="${UNAVAILABLE}" + cached "${DI_PID_1_PRODUCT_NAME}" && return [ -r "${PATH_PROC_1_ENVIRON}" ] || return out=$(tr '\0' '\n' <"${PATH_PROC_1_ENVIRON}") IFS="$CR"; set -- $out; IFS="$oifs" @@ -372,9 +372,9 @@ read_pid1_platform() { key=${tok%%=*} [ "$key" != "$tok" ] || continue val=${tok#*=} - [ "$key" = "platform" ] && platform="$val" && break + [ "$key" = "product_name" ] && product_name="$val" && break done - DI_PID_1_PLATFORM="$platform" + DI_PID_1_PRODUCT_NAME="$product_name" } dmi_product_name_matches() { @@ -805,7 +805,7 @@ dscheck_OpenStack() { # RDO installed nova (LP: #1675349). return ${DS_FOUND} fi - if [ "${DI_PID_1_PLATFORM}" = "$nova" ]; then + if [ "${DI_PID_1_PRODUCT_NAME}" = "$nova" ]; then return ${DS_FOUND} fi @@ -873,7 +873,7 @@ dscheck_None() { collect_info() { read_virt - read_pid1_platform + read_pid1_product_name read_kernel_cmdline read_uname_info read_config @@ -893,7 +893,7 @@ print_info() { _print_info() { local n="" v="" vars="" vars="DMI_PRODUCT_NAME DMI_SYS_VENDOR DMI_PRODUCT_SERIAL" - vars="$vars DMI_PRODUCT_UUID PID_1_PLATFORM" + vars="$vars DMI_PRODUCT_UUID PID_1_PRODUCT_NAME" vars="$vars FS_LABELS KERNEL_CMDLINE VIRT" vars="$vars UNAME_KERNEL_NAME UNAME_KERNEL_RELEASE UNAME_KERNEL_VERSION" vars="$vars UNAME_MACHINE UNAME_NODENAME UNAME_OPERATING_SYSTEM" |