summaryrefslogtreecommitdiff
path: root/mk/xe-linux-distribution
diff options
context:
space:
mode:
authormin li <min.li1@citrix.com>2019-06-19 15:38:15 +0800
committerGitHub <noreply@github.com>2019-06-19 15:38:15 +0800
commita419bc16924c46af0899b8402b7584bc7ce21cba (patch)
treed7c5c21437cb04b13c8267bd01b12a56d23866f0 /mk/xe-linux-distribution
parentb4efb2ddef5d749b3425b5a642da8316887aca48 (diff)
parenta8e974e8af029f866f9fcd8c101c945308bea59b (diff)
downloadvyos-xe-guest-utilities-a419bc16924c46af0899b8402b7584bc7ce21cba.tar.gz
vyos-xe-guest-utilities-a419bc16924c46af0899b8402b7584bc7ce21cba.zip
Merge pull request #65 from XihuanYang/feature/REQ-749v7.13.0
CP-31387(REQ-749): Add support to sle15sp1 os-release format
Diffstat (limited to 'mk/xe-linux-distribution')
-rwxr-xr-xmk/xe-linux-distribution6
1 files changed, 3 insertions, 3 deletions
diff --git a/mk/xe-linux-distribution b/mk/xe-linux-distribution
index a5f1b2a..dc35b2b 100755
--- a/mk/xe-linux-distribution
+++ b/mk/xe-linux-distribution
@@ -222,11 +222,11 @@ identify_sles()
fi
eval $(sed -n \
+ -e 's/^VERSION_ID="\([0-9]*\)\.\?\([0-9]*\)\?"$/major=\1;minor=\2;/gp' \
+ -e 's/^PRETTY_NAME="SUSE L\(inux\|INUX\) Enterprise \([a-zA-Z0-9_]*\) \([0-9]*\)\( SP[0-9]*\)\?"/_major=\3;_pretty_name=\0;/gp' \
-e 's/^SUSE L\(inux\|INUX\) Enterprise \([a-zA-Z0-9_]*\) \([0-9]*\) (.*)/_major=\3;_pretty_name="\0";/gp;' \
-e 's/^VERSION = \([0-9]*\)$/major=\1;/gp;' \
-e 's/^PATCHLEVEL = \([0-9]*\)$/minor=\1;/gp;' \
- -e 's/^PRETTY_NAME="SUSE L\(inux\|INUX\) Enterprise \([a-zA-Z0-9_]*\) \([0-9]*\)"/_major=\3;_pretty_name=\0;/gp' \
- -e 's/^VERSION="\([0-9]*\)"$/major=\1;/gp' \
"${suse_release}")
if [ -z "${major}" -o -z "${_major}" ] ; then
@@ -238,7 +238,7 @@ identify_sles()
fi
if [ -z "${minor}" ] ; then
- minor=0
+ minor=0
fi
write_to_output "sles" "${major}" "${minor}" "${_pretty_name##*=}"