Page 1 of 1

Upgrade Script not running

Posted: Fri Aug 14, 2009 5:05 am
by davidw
Hi There,

When I create and run this script the upgrade part works but the reboot does not.

/system script
add name=script1 policy=ftp,reboot,read,write,policy,test,winbox,password,sniff source="/system routerboard upgrade\r\n/system reboot\r\n"

I have to create 2 separate scripts to get the job done ?

Have tried all sorts of ";" delay 1's combination etc

Any ideas ?

Cheers

Re: Upgrade Script not running

Posted: Fri Aug 14, 2009 6:18 am
by davidw
For anyone who is interested I got it to work this way.

/system script add name="upgrade" source="/system routerboard upgrade"
/system script run upgrade
/system reboot

Re: Upgrade Script not running

Posted: Fri Aug 14, 2009 11:11 am
by Chupaka
For anyone who is interested I got it to work this way.

/system script add name="upgrade" source="/system routerboard upgrade"
/system script run upgrade
/system reboot
wo_Ot

why not just

/system routerboard upgrade
/system reboot

?..

Re: Upgrade Script not running

Posted: Sat Aug 15, 2009 4:26 pm
by davidw
For anyone who is interested I got it to work this way.

/system script add name="upgrade" source="/system routerboard upgrade"
/system script run upgrade
/system reboot
wo_Ot

why not just

/system routerboard upgrade
/system reboot

?..

Tried that but it just did not seem to work in fact thats what I tried the very first time.
The system routerboard upgrade command ran but the reboot did not happen.

Re: Upgrade Script not running

Posted: Sat Aug 15, 2009 7:12 pm
by Chupaka
but you still do reboot manually - what has been changed?.. %)

Re: Upgrade Script not running

Posted: Sun Aug 16, 2009 1:23 am
by davidw
I should mention that I am running these commands via ssh remotely, not via local terminal.

Re: Upgrade Script not running

Posted: Sun Aug 16, 2009 1:24 am
by Chupaka
hmmm... are you waiting for reply, or simply send both commands?..

Re: Upgrade Script not running

Posted: Sun Aug 16, 2009 1:36 am
by davidw
Just sending both commands

Re: Upgrade Script not running

Posted: Sun Aug 16, 2009 3:22 pm
by Chupaka
maybe that's the problem...

Re: Upgrade Script not running

Posted: Tue Jul 10, 2012 1:27 am
by ManyX
You may import this script from scheduler
/import upgrade-fw.rsc 
upgrade-fw.rsc
:if ([/system routerboard get current-firmware] != [/system routerboard get upgrade-firmware]) do={
:log error "Bios need upgrade";
/system script add name="upgrade" source="/system routerboard upgrade";
/system script run upgrade;
:delay 5;
/system script remove [find name=upgrade];
:delay 5;
/system reboot} else={:log warning "Nothing"}
regards.
BD