2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 17:46:38 +00:00

Merge pull request #1302 from tingtli/xcatd

modify the way to check the sync file
This commit is contained in:
neo954 2016-06-15 13:54:44 +08:00 committed by GitHub
commit 5edaf1503a
2 changed files with 10 additions and 4 deletions

View File

@ -92,8 +92,11 @@ cmd:xdsh $$CN mount
check:rc==0
check:output=~/nodedata/$$CN on /.statelite/persistent
check:output=~compute/rootimg on / type nfs
cmd:MNIP=`cat /etc/hosts|grep $$MN|awk '{print $1}'`; result=`xdsh $$CN "cat /etc/resolv.conf|grep $MNIP"`; if [ "$result" = "$$CN: nameserver $MNIP" ]; then echo "sync file works well"; fi;
check:output=~sync file works well
cmd:scp $$CN:/etc/resolv.conf /tmp/resolv.conf
check:rc==0
cmd:diff /etc/resolv.conf /tmp/resolv.conf
check:rc==0
cmd:rm -f /tmp/resolv.conf
cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then rm -rf $rootimgdir;fi
check:rc==0

View File

@ -94,8 +94,11 @@ cmd:xdsh $$CN mount
check:rc==0
check:output=~/nodedata/$$CN on /.statelite/persistent
check:output=~rootfs on / type
cmd:MNIP=`cat /etc/hosts|grep $$MN|awk '{print $1}'`; result=`xdsh $$CN "cat /etc/resolv.conf|grep $MNIP"`; if [ "$result" = "$$CN: nameserver $MNIP" ]; then echo "sync file works well"; fi;
check:output=~sync file works well
cmd:scp $$CN:/etc/resolv.conf /tmp/resolv.conf
check:rc==0
cmd:diff /etc/resolv.conf /tmp/resolv.conf
check:rc==0
cmd:rm -f /tmp/resolv.conf
cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi
check:rc==0