Skip to content

Commit

Permalink
Fixes #9238: rudder-setup fails on ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
amousset committed Oct 5, 2016
1 parent 7fce1c5 commit a0288bb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/rudder-setup/version-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,12 @@ rudder_is_compatible() {
# Remove the -suffix and only keep major version
$local MAJOR_VERSION=$(echo "$2"| cut -d '-' -f 1 | cut -f 1-2 -d .)
$local OS=$(echo "$3"|tr 'A-Z' 'a-z')
$local OS_VERSION=$(echo "$4"| cut -f 1 -d . | cut -d '-' -f 1)
if [ "${OS}" = "ubuntu" ]; then
# Keep the part after the first dot for ubuntu versions, e.g. 14.04
$local OS_VERSION=$(echo "$4"| cut -d '-' -f 1)
else
$local OS_VERSION=$(echo "$4"| cut -f 1 -d . | cut -d '-' -f 1)
fi

if get - "http://www.rudder-project.org/release-info/rudder/versions/${MAJOR_VERSION}/os/${OS}-${OS_VERSION}/roles" | grep "${ROLE}" >/dev/null
then
Expand Down

0 comments on commit a0288bb

Please sign in to comment.