From 4931203a089f3cf39a19370285e69b3430b45ad5 Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Mon, 15 Jul 2013 17:58:48 +0200 Subject: [PATCH] Unset OS_xx variable before generate configuration When generate_sample.sh generate the configuration of the keystone middleware part, it use OS_XXXXX environment variable if this one is set instead of the default one. This change unset this vairables, before generate_sample.sh inspect the code to always have the default value. Change-Id: I365387e99dff0e1c64cd1c4198088200bf726cd7 --- tools/conf/generate_sample.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/conf/generate_sample.sh b/tools/conf/generate_sample.sh index d42b40f81..e045ad9e8 100755 --- a/tools/conf/generate_sample.sh +++ b/tools/conf/generate_sample.sh @@ -17,6 +17,10 @@ # License for the specific language governing permissions and limitations # under the License. + +OS_VARS=$(set | sed -n '/^OS_/s/=[^=*]*$//gp' | xargs) +[ "$OS_VARS" ] && eval "unset \$OS_VARS" + FILES=$(find ceilometer -type f -name "*.py" ! -path "ceilometer/tests/*" -exec \ grep -l "Opt(" {} \; | sort -u)