From 5b1e5b45cf32bdc60dffc01dc798320499e03e14 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Sun, 7 Sep 2014 03:51:16 +0100 Subject: [PATCH] Arch stopped providing the version information on `/etc/arch-release` Fixes #457 --- bootstrap-salt.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bootstrap-salt.sh b/bootstrap-salt.sh index 49d55fd..842ade9 100755 --- a/bootstrap-salt.sh +++ b/bootstrap-salt.sh @@ -731,10 +731,11 @@ __gather_linux_system_info() { [ ! -f "/etc/${rsource}" ] && continue # Does not exist n=$(echo "${rsource}" | sed -e 's/[_-]release$//' -e 's/[_-]version$//') + shortname=$(echo "${n}" | tr '[:upper:]' '[:lower:]') rv=$( (grep VERSION "/etc/${rsource}"; cat "/etc/${rsource}") | grep '[0-9]' | sed -e 'q' ) - [ "${rv}" = "" ] && continue # There's no version information. Continue to next rsource + [ "${rv}" = "" ] && [ "$shortname" != "arch" ] && continue # There's no version information. Continue to next rsource v=$(__parse_version_string "$rv") - case $(echo "${n}" | tr '[:upper:]' '[:lower:]') in + case $shortname in redhat ) if [ "$(egrep 'CentOS' /etc/${rsource})" != "" ]; then n="CentOS"