From d5ecc62fdb71e3e340951be0700c59ec58dfe663 Mon Sep 17 00:00:00 2001 From: huweihua Date: Tue, 2 Apr 2019 21:53:17 -0400 Subject: [PATCH] move useless lines --- .../reg_linux_diskless_installation_flat | 8 ----- xCAT-test/autotest/testcase/xcatconfig/case0 | 29 +++++++++++++++++-- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat index 30928dc85..c1bfd7c5c 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat @@ -11,13 +11,9 @@ check:rc==0 cmd:makedns -n check:rc==0 -cmd:service goconserver status -cmd:service conserver status cmd:if [ -x /usr/bin/goconserver ]; then makegocons $$CN; else makeconservercf $$CN; fi check:rc==0 cmd:sleep 20 -cmd:service goconserver status -cmd:service conserver status cmd:if [[ "__GETNODEATTR($$CN,arch)__" = "ppc64" ]] && [[ "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]]; then getmacs -D $$CN; fi check:rc==0 cmd:makedhcp -n @@ -80,11 +76,7 @@ check:rc==0 cmd:xdsh $$CN "cat /var/log/xcat/xcat.log" cmd:xdsh $$CN "cat /test.synclist" check:rc==0 -cmd:service goconserver status -cmd:service conserver status cmd:if [ -x /usr/bin/goconserver ]; then makegocons -d $$CN; else makeconservercf -d $$CN; fi -cmd:service goconserver status -cmd:service conserver status cmd:if [[ -f /test.synclist.bak ]] ;then mv -f /test.synclist.bak /test.synclist;else rm -rf /test.synclist;fi cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute synclists= check:rc==0 diff --git a/xCAT-test/autotest/testcase/xcatconfig/case0 b/xCAT-test/autotest/testcase/xcatconfig/case0 index 33d2f71df..f3ba948eb 100644 --- a/xCAT-test/autotest/testcase/xcatconfig/case0 +++ b/xCAT-test/autotest/testcase/xcatconfig/case0 @@ -120,8 +120,33 @@ cmd:rm -rf /tmp/xcatconfig.test check:rc==0 cmd:rm -rf /etc/xcat/cabak /etc/xcat/certbak check:rc==0 -cmd:if service goconserver status; then echo "----->To restart goconserver"; service goconserver restart; sleep 10; echo "---------------------"; service goconserver status;echo "---------------------"; makegocons $$CN; fi -cmd:if service conserver status; then echo "---->To restart conserver"; service conserver restart;sleep 10;echo "---------------------"; service conserver status;echo "---------------------"; makeconservercf $$CN; fi +cmd:#!/bin/bash +rc=0 +if service goconserver status;then + echo "----->goconserver is working, to restart goconserver" + service goconserver restart + sleep 5 + echo "----->To check the status of goconserver" + if ! service goconserver status; then + rc=1 + fi + echo "----->To enforce conserver stop" + service conserver stop + sleep 5 + echo "----->To check the status of conserver" + if service conserver status; then + rc=1 + fi +elif service conserver status;then + echo "----->conserver is working, to restart conserver" + service conserver restart + echo "----->To check the status of conserver" + if ! service conserver status; then + rc=1 + fi +fi +exit $rc +check:rc==0 cmd:if lsdef service > /dev/null 2>&1; then updatenode service -P servicenode;fi check:rc==0 cmd:if lsdef service > /dev/null 2>&1; then rpower $$CN stat;fi