2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-31 01:56:39 +00:00

We are not taking the return code from runcmd, so don't echo it

This commit is contained in:
Victor Hu 2019-06-03 11:53:08 -04:00
parent e2de8a0b35
commit 5428d0be9a

View File

@ -2,14 +2,12 @@
PATH="/opt/xcat/bin:/opt/xcat/sbin:/opt/xcat/share/xcat/tools:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin"
export PATH
function runcmd(){
echo "Run command $*"
echo "Run command $* ..."
result=`$*`
if [[ $? -eq 0 ]];then
echo $result;
echo -e "Run command $*....[Succeed]\n";
echo -e "Run command $*... [Succeed]\n";
return 0;
else
echo $result;
echo -e "Run command $*... [Failed]\n";
return 1;
fi