From 4c3c7ea9ba50b51d1d922c12c5c41d10127e04fd Mon Sep 17 00:00:00 2001 From: Robert Collins Date: Mon, 12 Nov 2012 13:45:57 +1300 Subject: [PATCH] Fix handling of parameters that are not set by any flavour for eval_run_d. --- flavours/devstack/block-device-size.d/10-size | 1 - lib/common-functions | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/flavours/devstack/block-device-size.d/10-size b/flavours/devstack/block-device-size.d/10-size index df0f0c47..9db084ef 100755 --- a/flavours/devstack/block-device-size.d/10-size +++ b/flavours/devstack/block-device-size.d/10-size @@ -2,7 +2,6 @@ # Add the stack user we recommend folk use. set -e -set -x if (( '16' '>' $IMAGE_SIZE )); then echo IMAGE_SIZE=16 diff --git a/lib/common-functions b/lib/common-functions index 21eac23b..849dc72e 100644 --- a/lib/common-functions +++ b/lib/common-functions @@ -40,6 +40,8 @@ function check_flavour () { function eval_run_d () { local TEMP=`run_d $1` echo "$TEMP" - TEMP=`echo "$TEMP" | grep "$2"` - eval "$TEMP" + if [ `echo "$TEMP" | grep -s "$2"` ]; then + TEMP=`echo "$TEMP" | grep "$2"` + eval "$TEMP" + fi }