diff options
author | Wei Xie <wei.xie@citrix.com> | 2017-05-19 17:08:45 +0800 |
---|---|---|
committer | Wei Xie <wei.xie@citrix.com> | 2017-06-08 09:28:32 +0800 |
commit | c955ee06b1729154167dd9464c0e106cc191026b (patch) | |
tree | 99886f17ab7dd7d75a64e5891b226234065085e6 | |
parent | b16378be793648a31c7ce4bcb96e1b9c6dea8d05 (diff) | |
download | vyos-xe-guest-utilities-c955ee06b1729154167dd9464c0e106cc191026b.tar.gz vyos-xe-guest-utilities-c955ee06b1729154167dd9464c0e106cc191026b.zip |
Add support for Linx Linux.
Signed-off-by: Wei Xie <wei.xie@citrix.com>
-rwxr-xr-x | mk/xe-linux-distribution | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/mk/xe-linux-distribution b/mk/xe-linux-distribution index 8bf1b55..7777e68 100755 --- a/mk/xe-linux-distribution +++ b/mk/xe-linux-distribution @@ -369,6 +369,39 @@ identify_turbo() write_to_output "${distro}" "${major}" "${minor}" "$(head -n 1 ${turbo_release})" } + +identify_linx() +{ + linx_release="$1" + local distro + local major + local minor + + # distro + # '6.0.60.4' corresponds to Linx Linux 6 + # '6.0.80' corresponds to Linx Linux 8 + + + if [ ! -f "${linx_release}" ] ; then + return 1 + fi + + eval $(sed -rn \ + 's/^6.0.([0-9])0.*$/distro=linx;major=\1;minor=0;/gp;' \ + "${linx_release}") + + if [ -z "${major}" -o -z "${distro}" ] ; then + return 1 + fi + + if [ -z "${minor}" ] ; then + minor=0 + fi + + linx_osname="Linx Linux ${major}.${minor}" + write_to_output "${distro}" "${major}" "${minor}" "${linx_osname}" +} + identify_boot2docker() { boot2docker_release="$1" @@ -400,6 +433,8 @@ if [ -z "${TEST}" ] ; then identify_redhat /etc/centos-release && exit 0 identify_redhat /etc/redhat-release && exit 0 identify_sles /etc/SuSE-release && exit 0 + #identify Linx disto before debian, as Linx has both linx_release and debian_version. + identify_linx /etc/linx-release && exit 0 identify_lsb lsb_release && exit 0 identify_debian /etc/debian_version && exit 0 identify_boot2docker /etc/boot2docker && exit 0 |