davidw
August 14, 2009, 2:05am
1
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
davidw
August 14, 2009, 3:18am
2
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
?..
davidw
August 15, 2009, 1:26pm
4
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.
but you still do reboot manually - what has been changed?.. %)
davidw
August 15, 2009, 10:23pm
6
I should mention that I am running these commands via ssh remotely, not via local terminal.
hmmm… are you waiting for reply, or simply send both commands?..
davidw
August 15, 2009, 10:36pm
8
Just sending both commands
maybe that’s the problem…
ManyX
July 9, 2012, 10:27pm
10
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
What permissions are necessary in order to schedule and execute this kind of task?
try yourself,
remove all and add one by one until you do not find the right combo...
/system;routerboard upgrade;reboot
And in any case, the system can update itself...
Just do a normal reboot, without any other prerogatives.
/system routerboard settings set auto-upgrade=yes
1 Like
infabo
November 3, 2025, 7:21pm
13
So just the "reboot" policy is needed?