diff --git a/mk/install.sh b/mk/install.sh index d547735..e58f477 100755 --- a/mk/install.sh +++ b/mk/install.sh @@ -137,7 +137,7 @@ select_pkgs_rhel() rhel8|centos8|oracle8|scientific8|neokylin8|cloudlinux8) # No additional kernel package ;; - alpine3*) + alpine3*|sangoma*) # No additional kernel package ;; rhel3|fedora*) @@ -513,7 +513,7 @@ install_coreos() case "${os_distro}" in rhel|centos|oracle|fedora) select_pkgs_rhel ;; scientific|neokylin|asianux|turbo) select_pkgs_rhel ;; - alpine|cloudlinux) select_pkgs_rhel ;; + alpine|cloudlinux|sangoma) select_pkgs_rhel ;; sles|"suse linux") select_pkgs_sles ;; debian|ubuntu|linx|yinhe) select_pkgs_debian ;; xe-ddk|xe-sdk) select_pkgs_xe ;; diff --git a/mk/xe-linux-distribution b/mk/xe-linux-distribution index 2d1173d..2ca641a 100755 --- a/mk/xe-linux-distribution +++ b/mk/xe-linux-distribution @@ -361,6 +361,35 @@ identify_asianux() write_to_output "${distro}" "${major}" "${minor}" "$(head -n 1 ${asianux_release})" } +identify_sangoma() +{ + sangoma_release="$1" + local distro + local major + local minor + + # distro + # 'Sangoma Linux (FreePBX)' + + if [ ! -f "${sangoma_release}" ] ; then + return 1 + fi + + eval $(sed -rn \ + 's/^Sangoma Linux release \([0-9]*\)\.\([0-9]*\)\(\.[0-9]*\)\? (.*)/distro=sangoma;major=\1;minor=\2/gp;' \ + "${sangoma_release}") + + if [ -z "${major}" -o -z "${distro}" ] ; then + return 1 + fi + + if [ -z "${minor}" ] ; then + minor=0 + fi + + write_to_output "${distro}" "${major}" "${minor}" "$(head -n 1 ${sangoma_release})" +} + identify_turbo() { turbo_release="$1" @@ -542,6 +571,7 @@ if [ -z "${TEST}" ] ; then identify_debian /etc/debian_version && exit 0 identify_boot2docker /etc/boot2docker && exit 0 identify_alpine /etc/alpine-release && exit 0 + identify_sangoma /etc/centos-release && exit 0 if [ $# -eq 1 ] ; then