我正在ft820.rc
使用 bash 版本 bash 3.0 启动 ftam 服务器(在 CentOS 5 上),并且从脚本启动它时遇到问题,即在我执行的脚本中
ssh -nq root@$ip /etc/init.d/ft820.rc start
并且脚本不会在此行之后继续,尽管当我在定义的机器上执行时$ip
/etc/init.d/ft820.rc start
我会在服务启动后立即返回提示。
这是开始的代码ft820.rc
SPOOLPATH=/usr/spool/vertel
BINPATH=/usr/bin/osi/ft820
CONFIGFILE=${SPOOLPATH}/ffs.cfg
# Set DBUSERID to any value at all. Just need to make sure it is non-null for
# lockclr to work properly.
DBUSERID=
export DBUSERID
# if startup requested then ...
if [ "$1" = "start" ]
then
mask=`umask`
umask 0000
# startup the lock manager
${BINPATH}/lockmgr -u 16
# update attribute database
${BINPATH}/fua ${CONFIGFILE} > /dev/null
# clear concurrency locks
${BINPATH}/finit -cy ${CONFIGFILE} >/dev/null
# startup filestore
${BINPATH}/ffs ${CONFIGFILE}
if [ $? = 0 ]
then
echo Vertel FT-820 Filestore running.
else
echo Error detected while starting Vertel FT-820 Filestore.
fi
umask $mask