2.7.14出錯
System-Error: script error: no such command or directory (resolve)?情?大?:L resvlve前要加:最为前缀 在2.7.14 和2.8.11里
就??加的(下附script,)
2.8.11成功了,而2.7.14出?
System-Error: script error: no such command or directory (resolve)
# Setup global variables needed to keep track of changing IP address.
/system script add name="ddnsInit" source={
:log message="ddnsInit: Creating Dynamic DNS update system."
# ENTER YOUR CHANGEIP.COM USER ID HERE.
:global u
:set u "username"
# ENTER YOUR CHANGEIP.COM PASSWORD HERE.
:global p
:set p "password"
:global s
:set s "Mikrotik"
# ENTER THE TARGET HOSTNAME TO UPDATE, *1 is Set 1.
:global h
:set h "*1"
:global dhcpInterface
:set dhcpInterface [ /interface find type=pppoe-out ]
:log message=("ddnsInit: Found dhcp interface " . $dhcpInterface )
# EMAIL PROXY ADDRESS - DO NOT CHANGE FOR PRODUCTION.
:global ddnsProxyEmail
:set ddnsProxyEmail "ddnsUpdate@ChangeIP.com"
# ENTER YOUR EMAIL ADDRESS FOR CONFIRMATIONS.
:global ddnsFromEmail
:set ddnsFromEmail "username@xxxxx.com"
# SMTP DDNS PROXY SERVER - CHANGE ONLY IF NECESSARY (port 25 blocked?)
:global ddnsSmtpServer
:set ddnsSmtpServer [:resolve smtp.changeip.com]
:global a
:set a [ \
/ip address get \
\
address \
]
} 有可能2.7版本下的ICE命令里没有:resolve,你可以直接在Terminal下查询一下,操作如下:
admin&MikroTik>:?
这时会列出该版本支持的ICE命令,看看里面有没有resolve,同样,有的话,键入:resolve ?可以查询该命令的语法,我手头没有2.7的,你自己试试。或者你给我一个用户,我帮你试阿
首先3QU能回复,執行 :? 好像沒這個命令
首先3QU> :?
listlist all commands
executerun script as separate console job
localintroduces local variable
globalintroduces global variable
setchanges variable value
unsetremove variable
putprints argument on the screen
whileexecutes command while condition is true
ifexecutes command if condition is true
doexecutes command
timereturns time taken by command to execute
incrincrements variable
decrdecrements variable
forexecutes command for a range of integer values
foreachexecutes command for every element in a list
delaydoes nothing for a while
beep
environmentlist of all variables
logsend message to logs
2.8有resolve 這個指令
> :listlist all commands
resolvepreform a dns lookup of domain name
executerun script as separate console job
localintroduces local variable
globalintroduces global variable
setchanges variable value
unsetremove variable
putprints argument on the screen
whileexecutes command while condition is true
ifexecutes command if condition is true
doexecutes command
timereturns time taken by command to execute
incrincrements variable
decrdecrements variable
forexecutes command for a range of integer values
foreachexecutes command for every element in a list
delaydoes nothing for a while
logsend message to logs
beep
environmentlist of all variables 看来我的估计是对的,2.7里没有这个命令,这个脚本在2.7下腰出错的