diff options
author | Michael Polenchuk <mpolenchuk@mirantis.com> | 2017-12-18 07:23:20 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-12-18 07:23:20 +0000 |
commit | a7fcdb99e7b3cc9a2952c07da2e5e17be9f83c0d (patch) | |
tree | 74e3a9e990fb5fa0022702751f7abce3af8c32e1 /mcp/scripts | |
parent | 2fc4b8890ef1ad456ac1ff421f33e005ae0484be (diff) | |
parent | 15173a83dba08729e62da277b9165677323675d8 (diff) |
Merge "ci/deploy.sh: maas: cleanup_uefi on env erase"
Diffstat (limited to 'mcp/scripts')
-rw-r--r-- | mcp/scripts/lib.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh index 3dee9c51f..a1f347cb6 100644 --- a/mcp/scripts/lib.sh +++ b/mcp/scripts/lib.sh @@ -151,8 +151,9 @@ function cleanup_mounts { function cleanup_uefi { # Clean up Ubuntu boot entry if cfg01, kvm nodes online from previous deploy - # shellcheck disable=SC2086 - ssh ${SSH_OPTS} "${SSH_SALT}" "sudo salt -C 'kvm* or cmp*' cmd.run \ + local cmd_str="ssh ${SSH_OPTS} ${SSH_SALT}" + [ ! "$(hostname)" = 'cfg01' ] || cmd_str='eval' + ${cmd_str} "sudo salt -C 'kvm* or cmp*' cmd.run \ \"which efibootmgr > /dev/null 2>&1 && \ efibootmgr | grep -oP '(?<=Boot)[0-9]+(?=.*ubuntu)' | \ xargs -I{} efibootmgr --delete-bootnum --bootnum {}; \ |