I'm trying to automate getting a package onto a router using either fetc or /system upgrade and neither of them seem to work when embedded in an auto.rsc file or a plain script file. They both work fine when just pasted into a terminal. Is what I'm trying to do even possible?
The script is below.
Thanks,
Ken
:global architecture 0
:global architecture [:find [/sys resource get cpu] "4Kc"]
:if ($architecture>0) do [/tool fetch add=192.168.1.1 port=9198 mode=ftp path=routeros-mipsle-3.10.npk user=admin pass=blahblah]
:global architecture 0
:global architecture [:find [/sys resource get cpu] "Geode"]
:if ($architecture>0) do [/tool fetch add=192.168.1.1 port=9198 mode=ftp path=routeros-x86-3.10.npk user=admin pass=blahblah]
:global architecture 0
:global architecture [:find [/sys resource get cpu] "24K"]
:if ($architecture>0) do [/tool fetch add=192.168.1.1 port=9198 mode=ftp path=routeros-x86-3.10.npk user=admin pass=blahblah]
:global architecture 0
:global architecture [:find [/sys resource get cpu] "e300"]
:if ($architecture>0) do [/tool fetch add=192.168.1.1 port=9198 mode=ftp path=routeros-x86-3.10.npk user=admin pass=blahblah]