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:
@ -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
|
||||
|
Reference in New Issue
Block a user