ChangeIp.Com Script Problem

Hello,

I use the 3.x script from Wiki but when I execute the script from console, I receive the following message:

[xxx@mojiro.awmn] > / system script run xxx.xxx.com 
interrupted
           input does not match any value of value-name
[xxx@mojiro.awmn] >

I am NOT a scripting expert…

I looks like you may not have a default route interface that is “not marked” IE routting marks added…

Take a look at the script comments, it is looking for the interface name with a route of 0.0.0.0/0 (route of last resort or default route) WITHOUT routing marks set on it… ( i dont know why it doesnt want marks, you would have to ask Sam..)

I am guessing Sam will probably be the best resource on this one… take a look at his postings.. You will probably find the answer somewhare in them…

Thanks for your help.

Since I do not use routing marks I removed the “gateway” part, which detects the internet interface and I added static resolution of the interface like the 2.9.x script does.

# Define User Variables
:global ddnsuser      "xxx"
:global ddnspass      "xxx"
:global ddnshost      "xxx.xxx.com"
:global ddnsinterface "gw-inet.mojiro.awmn"

# Define Global Variables
:global ddnsip
:global ddnslastip
:if ([ :typeof $ddnslastip ] = nil ) do={ :global ddnslastip "0" }

:global ddnsinterface
:global ddnssystem ("mt-" . [/system package get system version] )

# Grab the current IP address on that interface.
:global ddnsip [ /ip address get [/ip address find interface=$ddnsinterface ] address ]

# Did we get an IP address to compare?
:if ([ :typeof $ddnsip ] = nil ) do={
   :log info ("DDNS: No ip address present on " . $ddnsinterface . ", please check.")
} else={

  :if ($ddnsip != $ddnslastip) do={
    :log info "DDNS: Sending UPDATE!"
    :log info [ :put [/tool dns-update name=$ddnshost address=[:pick $ddnsip 0 [:find $ddnsip "/"] ] key-name=$ddnsuser key=$ddnspass ] ]
    :global ddnslastip $ddnsip
  } else={ 
    :log info "DDNS: No update required."
  }

}

We have discovered that there is an issue with the current script and are working on an update. The ‘interface’ parameter is no longer supported under ‘ip route’ (at least with routing-test) so we are working on a new version. Look for it shortly in the wiki.

Sam