cancel
Showing results for 
Search instead for 
Did you mean: 

TG585 autorun a script

PAPED
Dabbler
Posts: 21
Thanks: 1
Registered: ‎09-12-2010

TG585 autorun a script

Does anyone know if its possible or how to add a script (added through telnet) so it runs when the router is booted?
I have added a script to sort a DNS host issue out that I have after a reboot, the script works great when manually run but I would like to get it to autorun at system boot up. There's some other scripts there already that I assume must be run by the systems somehow, I just cannot find where or how to config my own script to do the same...?
PS. All script lines are shown in the system.ini when I look my config backup
Thanks in advance for any help.
6 REPLIES 6
chrispurvey
Plusnet Alumni (retired)
Plusnet Alumni (retired)
Posts: 5,369
Fixes: 1
Registered: ‎13-07-2012

Re: TG585 autorun a script

Hi PAPED,
Not aware of being able to do this, but I will ask our hardware expert when he is back in the office for you.
prichardson
Grafter
Posts: 1,503
Thanks: 1
Registered: ‎05-04-2007

Re: TG585 autorun a script

It is not possible to auto run these scripts at system load. These are designed to dynamically build interfaces on certain conditions. One specific example is they can be run when a download file is initiated to the device through the update mechanism.
However, I'm not sure why you need a script to do the actions you are.
Commands you run on the CLI will build a config into memory and store those settings at the next time the configuration auto saves or when instructed to.
What are you performing with this script, as the actions should automatically be saved having run it the first time?
Gareth6
Grafter
Posts: 42
Registered: ‎17-03-2012

Re: TG585 autorun a script

Actually, it is possible  Grin
Windows event's are logged when devices are started and stopped. The event you want it is when the NIC becomes operational. It's in the system logs (source:VMSMP, id:23), just bind task to said event.
What are you doing with DNS to require running a script when the router restarts?  Undecided
prichardson
Grafter
Posts: 1,503
Thanks: 1
Registered: ‎05-04-2007

Re: TG585 autorun a script

Hi Gareth6,
The TG582n and TG585 have built in script commands via the command line interface.
Indeed, telnet scripting from another host is possible and Windows events could be used to trigger them using the events you describe. This is always widely used and a good example of doing this (and a number of other functions) is on the site:
http://npr.me.uk/scripting.html
What is being looked at here though, is using these commands to run pre-defined commands set in the router itself, in a completely autonomous way and without a secondary internal system which obviously needs to be power on to run them (either on the events you describe, or at power on for the system running it).
Gareth6
Grafter
Posts: 42
Registered: ‎17-03-2012

Re: TG585 autorun a script

Yeah it's a fix but not an ideal solution, which is why I asked what the issue is as running scripts resolve the DNS issue doesn't sound right. In my book if something seems too complicated, then you're probably doing it wrong (KISS).
I only got the Technicolor router yesterday and my initial thoughts after going through the basics and changing the DHCP settings. It's a quirky little device and not fun to work with. It took way to long to get up and running. I don't have a straightforward setup here either (run my own DNS/ AD server), but I did learn that I'd rather not touch that router if I can't avoid it. But I guess it keeps people from playing with settings that they shouldn't!
mattturner
Grafter
Posts: 246
Thanks: 2
Registered: ‎25-06-2009

Re: TG585 autorun a script

Hi Gareth,
The scripts part of the GUI is pretty legacy and is only really used for dynamic DHCP and dynamic VLAN configuration, I'm afraid it won't do what you're looking for it to do.
What commands are you running? Perhaps there is an alternative solution?
Cheers,
Matt