Merge pull request #967 from plumbis/patch-1

adds supports for Cumulus Linux
This commit is contained in:
Nicole Thomas 2016-10-07 15:28:15 -06:00 committed by GitHub
commit fc94494511

View file

@ -947,6 +947,8 @@ __gather_linux_system_info() {
return
elif [ "${DISTRO_NAME}" = "Raspbian" ]; then
DISTRO_NAME="Debian"
elif [ "${DISTRO_NAME}" = "Cumulus Linux" ]; then
DISTRO_NAME="Debian"
fi
rv=$(lsb_release -sr)
[ "${rv}" != "" ] && DISTRO_VERSION=$(__parse_version_string "$rv")
@ -1278,12 +1280,14 @@ __debian_derivatives_translation() {
# If the file does not exist, return
[ ! -f /etc/os-release ] && return
DEBIAN_DERIVATIVES="(kali|linuxmint)"
DEBIAN_DERIVATIVES="(kali|linuxmint|cumulus-linux)"
# Mappings
kali_1_debian_base="7.0"
linuxmint_1_debian_base="8.0"
cumulus_2_debian_base="7.0"
cumulus_3_debian_base="8.0"
# Detect derivates, Kali and LinuxMint *only* for now
# Detect derivates, Cumulus Linux, Kali and LinuxMint *only* for now
rv=$(grep ^ID= /etc/os-release | sed -e 's/.*=//')
# Translate Debian derivatives to their base Debian version
@ -1299,6 +1303,10 @@ __debian_derivatives_translation() {
_major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g')
_debian_derivative="linuxmint"
;;
cumulus-linux)
_major=$(echo "$DISTRO_VERSION" | sed 's/^\([0-9]*\).*/\1/g')
_debian_derivative="cumulus"
;;
esac
_debian_version=$(eval echo "\$${_debian_derivative}_${_major}_debian_base")