summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Xie <Wei.Xie@citrix.com>2017-03-29 13:19:19 +0800
committerWei Xie <Wei.Xie@citrix.com>2017-03-29 13:19:19 +0800
commit116a0c045c0eeb807cb379fb687a142400726ec9 (patch)
tree0f1d0f81ce0218574b2326eca644b0495df9b8b8
parent3a916607ce22059887c307f39345e6f643364f0b (diff)
downloadvyos-xe-guest-utilities-116a0c045c0eeb807cb379fb687a142400726ec9.tar.gz
vyos-xe-guest-utilities-116a0c045c0eeb807cb379fb687a142400726ec9.zip
CA-244770: Use extended regex parameter in sed
Signed-off-by: Wei Xie <Wei.Xie@citrix.com>
-rwxr-xr-xmk/xe-linux-distribution4
1 files changed, 2 insertions, 2 deletions
diff --git a/mk/xe-linux-distribution b/mk/xe-linux-distribution
index 5ba714a..76fa531 100755
--- a/mk/xe-linux-distribution
+++ b/mk/xe-linux-distribution
@@ -291,8 +291,8 @@ identify_kylin()
return 1
fi
- eval $(sed -n -e \
- 's/^NeoKylin Linux Advanced Server release V*\([0-9]*\)\\D*\([0-9]*\).*$/distro=neokylin;major=\1;minor=\2;/gp;' \
+ eval $(sed -rn \
+ 's/^NeoKylin Linux Advanced Server release V*([0-9]*)[^0-9]*([0-9]*).*$/distro=neokylin;major=\1;minor=\2;/gp;' \
"${kylin_release}")
if [ -z "${major}" -o -z "${distro}" ] ; then