]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
heat scripts : Avoid using lsb_release in tools/openstack
authorSteven Hardy <shardy@redhat.com>
Thu, 7 Feb 2013 11:16:28 +0000 (11:16 +0000)
committerSteven Hardy <shardy@redhat.com>
Thu, 7 Feb 2013 11:16:28 +0000 (11:16 +0000)
lsb_release is not installed by default on Fedora (or at least
it's not on my F17 box), so we should avoid using it, simple
alternative is just to read /etc/fedora-release instead

Change-Id: I341c151e8560fb971b11d27578934940aeeca1a7
Signed-off-by: Steven Hardy <shardy@redhat.com>
tools/openstack

index 2fa187f4821fe0ad6fc9b016e0b7ae0b354cac94..26862709a6eb8ae6d210f328d999e6d5efa2f269 100755 (executable)
@@ -27,7 +27,8 @@ else
     with_cinder=0
 fi
 
-if [[ `lsb_release -sr` -gt 17 || $with_cinder -eq 1 ]]; then
+FEDORA_VERSION=$(cat /etc/fedora-release | awk '{print $3}')
+if [[ $FEDORA_VERSION -gt 17 || $with_cinder -eq 1 ]]; then
     VOLUME_SERVICE="openstack-cinder"
     VOLUME_PATH="/var/lib/cinder/cinder-volumes.img"
     VOLUME_NAME="cinder-volumes"