From 9344ac68766f08d877c47a29c49bf12c072fbcb7 Mon Sep 17 00:00:00 2001 From: Jamie Lennox Date: Thu, 17 Aug 2017 16:41:48 +1000 Subject: [PATCH] Define CONFIG_DRIVE_LABEL in default case glean.sh runs with set -eu which will cause an error if a variable is undefined. When not using config drive and not getting a match the variable CONFIG_DRIVE_LABEL is unset and so the -n test will fail meaning that glean won't start and our VMs don't get network access on boot. Change-Id: I5fa6ce1c4a0b7218475ad5e8983df7be4ab174f4 Signed-off-by: Jamie Lennox --- glean/init/glean.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/glean/init/glean.sh b/glean/init/glean.sh index 26863bf..b588f86 100755 --- a/glean/init/glean.sh +++ b/glean/init/glean.sh @@ -42,6 +42,8 @@ function config_exists() { # NOTE(mnaser): Depending on the cloud, it may have `vfat` config drive which # comes with a capitalized label rather than all lowercase. +CONFIG_DRIVE_LABEL="" + if blkid -t LABEL="config-2" ; then CONFIG_DRIVE_LABEL="config-2" elif blkid -t LABEL="CONFIG-2" ; then