Openwrt configurations
Script for automatically installing all the third party packages missing after an upgrade
When doing a full system upgrade on OpenWrt, it's important to remember that old packages that were installed via opkg manually will not survive the upgrade.
As such, whenever an upgrade is done, you will have to manually reinstall those missing packages once again.
To automate this process, please remember that before initiating the upgrade process, it's a good idea to check the checkbox that lets you create a text file containing the names of all the packages that existed on the previous system to know what was there so that you can reinstall it after the upgrade is complete.
Usually the path of the file that contains these packages is /etc/backup/installed_packages.txt
Once this is done and the upgrade is fully finished, you can use a script to parse the aforementioned text file and install all the packages mentioned in it. The script is the following:
Be sure to remember to change the path and name of the installed_packages.txt command from above to whatever the path and name for the file you generate in the aforementioned process.