lisidong 发表于 2005-10-10 16:16:48

2.7.14出錯

System-Error: script error: no such command or directory (resolve)
?情?大?:L

cnyepeng 发表于 2005-10-10 16:24:22

resvlve前要加:最为前缀

lisidong 发表于 2005-10-11 09:35:02

在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 \
    ]

}

cnyepeng 发表于 2005-10-11 09:48:10

有可能2.7版本下的ICE命令里没有:resolve,你可以直接在Terminal下查询一下,操作如下:
admin&MikroTik>:?
这时会列出该版本支持的ICE命令,看看里面有没有resolve,同样,有的话,键入:resolve ?可以查询该命令的语法,我手头没有2.7的,你自己试试。或者你给我一个用户,我帮你试阿

lisidong 发表于 2005-10-11 10:07:18

首先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

lisidong 发表于 2005-10-11 10:09:14

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

cnyepeng 发表于 2005-10-11 11:11:34

看来我的估计是对的,2.7里没有这个命令,这个脚本在2.7下腰出错的

lisidong 发表于 2005-10-11 16:01:08

回复 #99 cnyepeng 的帖子

2.7.14有??法??ddns,因?台2.7.14已用?年,一直都很?定

cnyepeng 发表于 2005-10-11 20:08:05

最简单的就是带:resolve命令的这句直接set一个ip值啊

cnyepeng 发表于 2005-10-11 20:11:42

我也是从2.7开始用的,看来我们用ros的历史差不多,都有两年多了,只不过你一直忠于原味,我可是中间换了好几个版本,现在用的是2.8的

lisidong 发表于 2005-10-11 22:09:41

只因那两台2.7.14,机器较老为166M-32M-200M硬盘

lyd2004888 发表于 2005-10-19 16:48:26

我试了2826 2827都不行 

hzhui 发表于 2005-12-2 13:37:27

28.28行不行

sky123888 发表于 2005-12-2 18:46:13

很爽哦,谢谢楼主。

hzhui 发表于 2005-12-3 13:08:44

楼主能不能做个视频出来
页: 1 2 3 4 5 6 7 [8] 9 10 11
查看完整版本: 动态域名更新的实现方法