diff options
author | Wei Xie <wei.xie@citrix.com> | 2017-05-18 15:33:30 +0800 |
---|---|---|
committer | Wei Xie <wei.xie@citrix.com> | 2017-05-31 09:27:37 +0800 |
commit | 447814e87f1a58a60e81e55096361facb28c121d (patch) | |
tree | 80b06a06e8335536752b817891806433c1444646 | |
parent | b467af09a66af86d82dc7430d149a299a5b50f7c (diff) | |
download | vyos-xe-guest-utilities-447814e87f1a58a60e81e55096361facb28c121d.tar.gz vyos-xe-guest-utilities-447814e87f1a58a60e81e55096361facb28c121d.zip |
CP-22358: Identify Turbo Linux.
Signed-off-by: Wei Xie <wei.xie@citrix.com>
-rwxr-xr-x | mk/xe-linux-distribution | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/mk/xe-linux-distribution b/mk/xe-linux-distribution index 35a8a87..8bf1b55 100755 --- a/mk/xe-linux-distribution +++ b/mk/xe-linux-distribution @@ -340,6 +340,35 @@ identify_asianux() write_to_output "${distro}" "${major}" "${minor}" "$(head -n 1 ${asianux_release})" } +identify_turbo() +{ + turbo_release="$1" + local distro + local major + local minor + + # distro + # GreatTurbo Enterprise Server release 12.2 (Theseus) + + if [ ! -f "${turbo_release}" ] ; then + return 1 + fi + + eval $(sed -rn \ + 's/^GreatTurbo[^0-9]*([0-9]*)\.?([0-9]*)?.*$/distro=turbo;major=\1;minor=\2;/gp;' \ + "${turbo_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 ${turbo_release})" +} + identify_boot2docker() { boot2docker_release="$1" @@ -364,6 +393,7 @@ fi if [ -z "${TEST}" ] ; then #identify kylin disto before redhat, as kylin has both kylin_release and redhat_release. identify_asianux /etc/asianux-release && exit 0 + identify_turbo /etc/turbo-release && exit 0 identify_kylin /etc/neokylin-release && exit 0 identify_redhat /etc/oracle-release && exit 0 identify_redhat /etc/enterprise-release && exit 0 |