Provide lsb_release in snapshot builds

Some CentOS 6 images do not come with redhat-lsb-core preinstalled,
so the lsb_release command is not available when prepare_node.sh
wants it. Make sure we install it first if it's not already there.

Change-Id: Ieeae21538c237e069acbc4df051474071b81ba4a
This commit is contained in:
Jeremy Stanley
2015-05-01 17:29:26 +00:00
parent cd35606032
commit 3020955e85

View File

@ -31,6 +31,10 @@ fi
echo $HOSTNAME > /tmp/image-hostname.txt
sudo mv /tmp/image-hostname.txt /etc/image-hostname.txt
# CentOS 6 image doesn't come with lsb_release
if [ -f /usr/bin/yum ]; then
sudo yum -y install redhat-lsb-core
fi
LSBDISTID=$(lsb_release -is)
LSBDISTCODENAME=$(lsb_release -cs)
if [ "$LSBDISTID" == "Ubuntu" ] ; then