зеркало из https://github.com/microsoft/spinnaker.git
Merge pull request #827 from ewiseblatt/fix_boot
Ignore empty metadata values
This commit is contained in:
Коммит
5c5fc48a15
|
@ -81,7 +81,7 @@ function clear_metadata_to_file() {
|
|||
local path="$2"
|
||||
local value=$(get_instance_metadata_attribute "$key")
|
||||
|
||||
if [[ "$value" != "" ]]; then
|
||||
if [[ $value = *[![:space:]]* ]]; then
|
||||
echo "$value" > $path
|
||||
chown spinnaker:spinnaker $path
|
||||
clear_instance_metadata "$key"
|
||||
|
@ -89,6 +89,9 @@ function clear_metadata_to_file() {
|
|||
die "Could not clear metadata from $key"
|
||||
fi
|
||||
return 0
|
||||
elif [[ $value != "" ]]; then
|
||||
# Clear key anyway, but act as if it werent there.
|
||||
clear_instance_metadata "$key"
|
||||
fi
|
||||
|
||||
return 1
|
||||
|
|
Загрузка…
Ссылка в новой задаче