Hi,
a request that I consider it useful: can be very useful to pack own custom scripts into a file npk. Installation and update scripts can be managed more easily. Unfortunately there is no system tools by mikrotik to create packages npk.
But the .rsc file is a text file. Ok one could also write all the code of a program within the Main function. If one wants to create a modular code can be a good thing split across multiple files.
There’s a very small difference between having one script on a computer and many. Especially given remote access. Think of that first script as your setup boot strap. You could have it retrieve as many other scripts as you want and run them or not. Heck you could have it retrieve a list of other scripts to retrieve…
I am understand that you can do the same thing in many different ways.
For example, if I have a script that automatically update a script of device i can
download a own npk package and restart device for automatic update
OR
download every single script, check the integrity and removing the unnecessary files
The first solution is much easier to development than the second solution.
My request was only to simplify some tasks.
I’m also curious about the ability to effectively configure a Mikrotik just by uploading a single, customized “Combined Package” file, and thus about the complexity of creating that file.
For my scenario, I anticipate deploying several RB750GLs to remote customers. I will never the touch the routers; they would be shipped directly to a customer and setup by a 3rd party installer. Imagine such installers charge $500US per hour, so it is of extreme importance not to give the installer more work to do than necessary.
Since the shipped RB750GLs may come with any (old) version of RouterOS, the routers will need to be upgraded by the 3rd party installer onsite to ensure compatibility with the router config *.backup file that I email the installer.
My current scenario has the installer doing the following for each RB750GL at each customer location:
Download “Combined Package” and “All Packages” files from mikrotik.com
Power up the device and connect it to a PC/laptop.
Start Winbox session.
Upgrade the device to RouterOS v5.7 using “Combined Package” file.
Start Winbox session (again).
Extract NTP package file (which is not included in the “Combined Package”) to permit time sync.
Upload NTP package to device.
Start Winbox session (yet again).
Upload custom *.backup to device.
Restore device to *.backup file just uploaded.
This works out to an install document just for the router with many steps, to be performed for each router. Fewer steps would be very helpful.
OpenWRT, for example, lets you compile your own package selection and whatever /etc/* config into a single image to flash to the device. Is this not possible with RouterOS?
Simple NTP is already builtin, so no need to install the NTP package unless the router is providing an NTP server to the site.
There’s no need to install the packages separately. You can upload the combined package and the NTP package to the router at the same time and reboot once.
You’re forgetting to update the boot loader which unfortunately does require another restart.
Other files are kept across the upgrade and reboots so you can upload everything at once, and run your customization script or restore from your custom backup when you’re done with the upgrade. That will streamline your procedure a bit.
You can also use Netinstall and use RSC export files instead of backup files. Then it would only be one click. Start the RB750 while holding it’s button, to start in Netinstall mode, click Install in Netinstall to install selected packages, and also a custom RSC file.
Backup file is not a good solution for configuring other routers.
one more note - you can use auto.rsc file that will be executed when uploaded to the router using FTP service. Where you can set up featch to pull required files, remove configuration and recreate it. Just write commands in order, use :delay
Thank you for pointing out the use of RSC export files; I´ll look into them. (Likewise, thanks for pointing out existence of SNTP service, besides the additional NTP package.)