diff options
author | min li <min.li1@citrix.com> | 2019-06-19 15:38:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-19 15:38:15 +0800 |
commit | a419bc16924c46af0899b8402b7584bc7ce21cba (patch) | |
tree | d7c5c21437cb04b13c8267bd01b12a56d23866f0 | |
parent | b4efb2ddef5d749b3425b5a642da8316887aca48 (diff) | |
parent | a8e974e8af029f866f9fcd8c101c945308bea59b (diff) | |
download | vyos-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
-rw-r--r-- | mk/testcases/sle-15sp1 | 8 | ||||
-rwxr-xr-x | mk/xe-linux-distribution | 6 | ||||
-rwxr-xr-x | mk/xe-linux-distribution-test | 1 |
3 files changed, 12 insertions, 3 deletions
diff --git a/mk/testcases/sle-15sp1 b/mk/testcases/sle-15sp1 new file mode 100644 index 0000000..c916157 --- /dev/null +++ b/mk/testcases/sle-15sp1 @@ -0,0 +1,8 @@ +NAME="SLES" +VERSION="15-SP1" +VERSION_ID="15.1" +PRETTY_NAME="SUSE Linux Enterprise Server 15 SP1" +ID="sles" +ID_LIKE="suse" +ANSI_COLOR="0;32" +CPE_NAME="cpe:/o:suse:sles:15:sp1" 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##*=}" diff --git a/mk/xe-linux-distribution-test b/mk/xe-linux-distribution-test index 51c800a..6bc26b8 100755 --- a/mk/xe-linux-distribution-test +++ b/mk/xe-linux-distribution-test @@ -79,4 +79,5 @@ do_test "testcases/oracle-5" "oracle 5 0" do_test "testcases/oracle-5u1" "oracle 5 1" do_test "testcases/lsb-coreos-367.1.0" "coreos 367 1.0" do_test "testcases/sle-15" "sles 15 0" +do_test "testcases/sle-15sp1" "sles 15 1" exit 0 |