📄 lrmbasicsanitycheck.in
字号:
#!/bin/bash # Copyright (c) 2004 International Business Machines # Author: Huang Zhen <zhenhltc@cn.ibm.com> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This software is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #HBLIB=@libdir@/heartbeatLRMD=$HBLIB/lrmdLRMADMIN=$HBLIB/lrmadminif [ $# -gt 0 ]; then LRMD=$1/lrmd LRMADMIN=$1/lrmadminfiif [ ! -f $LRMD ]; then echo $LRMD does not exist exit 1fiif [ ! -f $LRMADMIN ]; then echo $LRMADMIN does not exist exit 1fi #kill the previous instance lrm$LRMD -k#start the new instance of lrm$LRMD -r &sleep 1#check is the new instance running$LRMD -sif [ $? != 0 ]; then echo Can not start lrmd exit 1fi#check can we login$LRMADMIN -dif [ $? != 0 ]; then echo Can not logon to lrmd exit 1fi#list the classes support$LRMADMIN -Cif [ $? != 0 ]; then echo Can not get ra classes supported exit 1fi#add a resource$LRMADMIN -A ip heartbeat IPaddr NULL 192.168.58.4if [ $? != 0 ]; then echo Can not add new resource exit 1fi#get the resource added$LRMADMIN -I ipif [ $? != 0 ]; then echo Can not get the resource added exit 1fi#delete the resource$LRMADMIN -D ipif [ $? != 0 ]; then echo Can not delete the resource exit 1fi#kill the instance$LRMD -kexit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -