From f7c7ea884fb0daf23efb76135107474d073a2fdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=E1=B4=8F=C9=B4=C9=A2=20Jie?= Date: Mon, 25 Jun 2018 20:51:10 +0800 Subject: [PATCH] [go-xcat] Fix package version checking on Ubuntu 18.04 (#5320) --- xCAT-server/share/xcat/tools/go-xcat | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index 4ae3f65cc..6fe87e9a2 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -2,7 +2,7 @@ # # go-xcat - Install xCAT automatically. # -# Version 1.0.27 +# Version 1.0.28 # # Copyright (C) 2016, 2017, 2018 International Business Machines # Eclipse Public License, Version 1.0 (EPL-1.0) @@ -438,7 +438,12 @@ function check_package_version_deb() do if [[ "$1" = "${name[i]}" ]] then - echo "${ver[i]}" + if [[ -n "${ver[i]}" ]] + then + echo "${ver[i]}" + else + echo "(not installed)" + fi unset "name[${i}]" "ver[${i}]" shift && continue 2 fi