This script will do the following:
- Gather list of installed packages that does not exist in the ROM
- Create a script to reinstall the packages
- Add the newly created script to
/etc/rc.local
Run this script before the sysupgrade process. Once flashing has started, wait for the router to reboot two times. The script will remove itself after successful execution.
ash -c "$(wget -qO - https://gist.github.com/whiskerz007/a01848c69f6c819fff4512827929da7e/raw/openwrt_sysupgrade_helper.sh)"