It is almost four years since I wrote about openwrt-reinstall. That was the first public version of this script that tries to get openwrt updates a little bit closer to the big distros trying to achieve something similar to what we get when we do an apt dist-upgrade or similar.
I'm talking about an script that will reinstall all your packages when you do a sysupgrade of your openwrt to jump to the newest version and thus allowing you to do the jump without loosing your functionalities or your configs. Personally this has been the biggest problem on OpenWRT for me since I started playing with it back on the Linksys WRT, the Foneras and all those routers that now belong to our beloved museum :-) and now with openwrt-reinstall I really love to update, please read the original article to know more about it.
Anyway, I'm writing today to announce that I have added two new parameters:
- check compares the previous package status that we had when we last run reinstall with the current package status and will tell you if you have installed any new package so that you can add it to reinstall.conf and have it automatically reinstalled
- chen calls check and then calls enable so that you get both the info from check and you enable the service
So the idea is that before you do a sysupgrade you run: /etc/init.d/reinstall chen
and you get the info on the packages you have added to your system since your last reinstall and enable reinstall so that after you add those new packages to /etc/reinstall.conf and you run sysupgrade /tmp/openwrt-whatever-sysupgrade.bin
you end up with your updated system and everything configured like it was before.
By default the status of the packages is generated after reinstallation and left on /root/reinstall.status for the next time to check for differences, so you can create a opkg list-installed >/root/reinstall.status
of a clean install and then do a "chen" wich will compare current packages against that one or just update reinstall before you use it to reinstall after you update to the latest OpenWRT (24.10.2 was released last week). That way you'll get your status created so that next time around either "check" or "chen" will let you know those packages that you have added.
As always, I hope you enjoy it and if you have any sugestions you can write them on the comments or even better through bugs or pull requests or whatever on github.