This script reinstalls critical packages after you upgrade your OpenWRT so you can get back to them remotely.
- place script in /root/opkg_reinstall_after_fw_upgrade/opkg_reinstall.sh
-run in terminal:
touch "/etc/_OPKG_REINSTALL_COMPLETE"
chmod 0755 /root/opkg_reinstall_after_fw_upgrade/opkg_reinstall.sh
- add directory /root
## This file contains files and directories that should
## be preserved during an upgrade.
# /etc/example.conf
# /etc/openvpn/
/root
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
( /bin/sleep 30; /bin/sh /root/opkg_reinstall_after_fw_upgrade/opkg_reinstall.sh ) &
exit 0
- retain the settings
- add or remove packages, make sure all of them are available
- if your wifi is not configured, please remove the
waitForInternetConnection
at the bottom of the file
- check logs after each update
- if you have the option, try new OpenWRT versions first on remote locations you have other means of access to (eg. public IPv6, physical closeness)
- try the script before you depend on it
- Catfriend1 @ https://forum.openwrt.org/u/catfriend1 for the original script
- TheHellSite @ https://forum.openwrt.org/u/TheHellSite for improvements
- Ashus @ https://github.com/Ashus for more improvements
- sourced from https://forum.openwrt.org/t/automatic-update-script/75193