diff options
author | Xihuan Yang <xihuan.yang@citrix.com> | 2019-06-12 05:38:57 +0000 |
---|---|---|
committer | Xihuan Yang <xihuan.yang@citrix.com> | 2019-06-19 04:54:34 +0000 |
commit | a8e974e8af029f866f9fcd8c101c945308bea59b (patch) | |
tree | d7c5c21437cb04b13c8267bd01b12a56d23866f0 | |
parent | b4efb2ddef5d749b3425b5a642da8316887aca48 (diff) | |
download | vyos-xe-guest-utilities-a8e974e8af029f866f9fcd8c101c945308bea59b.tar.gz vyos-xe-guest-utilities-a8e974e8af029f866f9fcd8c101c945308bea59b.zip |
CP-31387(REQ-749): add support to sle15sp1 os-release format
Signed-off-by: Xihuan Yang <xihuan.yang@citrix.com>
-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 |