问题描述
我正在使用tera Term(.TTL)内的脚本进行工作,我有些困惑,可能是什么导致我在 recvln 中看到的类型不匹配错误。几乎就像脚本停止了将返回的数据视为文本一样……我尝试使用 wait 进行检查,但是结果从未被“看到”。这是我的代码...
;commenting out unneeded volumes in fstab.
sendln 'findmnt --fstab /apps/xxx -n -o SOURCE,TARGET'
mpause 500
;wait '/dev/sdc /apps/xxx' '' ;this does not quite work
recvln
rcvdtxt = inputstr ;same results as with using inputstr directly
if rcvdtxt = '' then
messageBox 'no /apps/xxx mount found' 'good'
elseif rcvdtxt = '/dev/sdc /apps/xxx' then
messageBox '/apps/xxx mount present' 'bad'
;sendln 'dzdo umount /apps/xxx'
;SED command needed to insert comment just above the tested mount point in fstab
sendln "dzdo sed '/^\/dev\/sdc/i # This mount is commented out as it will interfere with the application deployment' /etc/fstab"
sendln "dzdo sed 's/^\/dev\/sdc/#\/dev\/sdc/' /etc/fstab"
endif
pause 1
sendln 'findmnt --fstab /apps/jboss-eap-6.4 -n -o SOURCE,TARGET'
mpause 500
recvln
;wait '/dev/sdd /apps/jboss-eap-6.4' ''
rcvdtxt = inputstr
if rcvdtxt = '' then
messageBox 'no /apps/jboss-eap-6.4 mount' 'good'
elseif rcvdtxt = '/dev/sdd /apps/jboss-eap-6.4' then
messageBox '/apps/jboss-eap-6.4 mount present' 'bad'
;sendln 'dzdo umount /apps/jboss-eap-6.4'
;sendln 'cd /apps'
;sendln 'dzdo rm -rf ./jboss-eap-6.4'
;SED command needed to insert comment just above the tested mount point in fstab
sendln "dzdo sed '/^\/dev\/sdd/i ## This mount is commented out as it will interfere with the application deployment ' /etc/fstab"
sendln "dzdo sed 's/^\/dev\/sdd/#\/dev\/sdc/' /etc/fstab"
endif
pause 1
;sendln 'clear'
sendln 'cat /etc/fstab'
sendln 'cat'
yesnoBox 'Verify fstab updates,continue?' 'stop testing'
if result = 0 then
messageBox 'Stopping macro' 'message'
sendln 'cat'
end
endif
被注释掉的行是故意的。我已经测试了SED,并且知道它不会更新fstab。同样是lvresize。在我可以解决条件语句的问题之前,我不希望进行任何更改。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)