2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-24 15:05:36 +00:00

add information to check the version

This commit is contained in:
litingt@cn.ibm.com
2018-03-26 22:09:18 -04:00
parent 0e0584e423
commit 5aa24911f4

View File

@ -54,6 +54,13 @@ cmd:migration_version=`echo $$MIGRATION2_VERSION |cut -d "." -f -2`; xdsh $$CN "
check:rc==0
cmd:cat /tmp/go-xcat.log
cmd:xdsh $$CN "source /etc/profile.d/xcat.sh;lsxcatd -v"
check:rc==0
cmd:migration_version=`echo $$MIGRATION2_VERSION |cut -d "." -f -2`;cd /;if grep Ubuntu /etc/*release;then cd / ; wget http://xcat.org/files/xcat/repos/apt/$migration_version/xcat-core/buildinfo;else cd / ; wget http://xcat.org/files/xcat/repos/yum/$migration_version/xcat-core/buildinfo; fi
cmd:xdsh $$CN "lsxcatd -v" |tee /tmp/version
cmd:if [ -e /buildinfo ]; then xcatversion=`grep VERSION /buildinfo |awk -F'=' '{print $2}'`;grep $xcatversion /tmp/version; fi
check:rc==0
cmd:migration_version=`echo $$MIGRATION2_VERSION |cut -d "." -f -2`;grep $migration_version /tmp/version
check:rc==0
cmd:xdsh $$CN "service xcatd status"
check:rc==0
check:output=~running
@ -63,6 +70,8 @@ check:rc==0
cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa|grep -i perl-xcat";fi
check:rc!=0
cmd:xdsh $$CN "cd /; rm -rf /go-xcat"
cmd:rm -rf /tmp/version
cmd:rm -rf /buildinfo
end
start:go_xcat_with_xcat-version-1
@ -122,6 +131,12 @@ check:rc==0
cmd:cat /tmp/go-xcat.log
cmd:xdsh $$CN "source /etc/profile.d/xcat.sh;lsxcatd -v"
check:rc==0
cmd:migration_version=`echo $$MIGRATION2_VERSION |cut -d "." -f -2`;cd /;if grep Ubuntu /etc/*release;then cd / ; wget http://xcat.org/files/xcat/repos/apt/$migration_version/xcat-core/buildinfo;else cd / ; wget http://xcat.org/files/xcat/repos/yum/$migration_version/xcat-core/buildinfo; fi
cmd:xdsh $$CN "lsxcatd -v" |tee /tmp/version
cmd:if [ -e /buildinfo ]; then xcatversion=`grep VERSION /buildinfo |awk -F'=' '{print $2}'`;grep $xcatversion /tmp/version; fi
check:rc==0
cmd:migration_version=`echo $$MIGRATION2_VERSION |cut -d "." -f -2`;grep $migration_version /tmp/version
check:rc==0
cmd:xdsh $$CN "service xcatd status"
check:rc==0
check:output=~running
@ -131,4 +146,6 @@ check:rc==0
cmd:if grep Ubuntu /etc/*release;then xdsh $$CN "dpkg -l |grep -i perl-xcat";else xdsh $$CN "rpm -qa|grep -i perl-xcat";fi
check:rc!=0
cmd:xdsh $$CN "cd /; rm -rf /go-xcat"
cmd:rm -rf /tmp/version
cmd:rm -rf /buildinfo
end