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 <shardy@redhat.com>
Change-Id: I9031218796a52efd350c39167ecb112048dad218
This commit is contained in:
Steven Hardy 2012-12-14 09:44:03 +00:00
parent aaded4d3fa
commit afc2a57a9d
1 changed files with 3 additions and 3 deletions

View File

@ -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
}