From afc2a57a9ddb2be6e703150f91f753e33850a631 Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Fri, 14 Dec 2012 09:44:03 +0000 Subject: [PATCH] install.sh simplify heat-engine.conf conditional Minor tweak to the conditional detecting heat-engine.conf to sed in the encryption key - this will allow rabbitmq detection to only be done in one place ref bug 1090420 Signed-off-by: Steven Hardy Change-Id: I9031218796a52efd350c39167ecb112048dad218 --- install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 92bbd3cd..e1b8a5fe 100755 --- a/install.sh +++ b/install.sh @@ -26,12 +26,12 @@ install_dir() { elif [ -f $prefix/$f ]; then echo "NOT replacing existing config file $prefix/$f" >&2 diff -u $prefix/$f $f - elif [ $fn = 'heat-engine.conf' ]; then - cat $f | sed s/%ENCRYPTION_KEY%/`hexdump -n 16 -v -e '/1 "%02x"' /dev/random`/ > $prefix/$f else - echo "Installing $fn in $prefix/$dir" >&2 install -m 664 $f $prefix/$dir + if [ $fn = 'heat-engine.conf' ]; then + sed -i "s/%ENCRYPTION_KEY%/`hexdump -n 16 -v -e '/1 "%02x"' /dev/random`/" $prefix/$f + fi fi done } -- 2.45.2