My services all get enabled after sysupgrade. How can i preserve my service startup settings including disabled ones?
2 Likes
Yeah thanks i allready use a uci-defaults file which disables services at boot once. But i always have to adjust that file to the current situation.
I goal is to do a sysupgrade and it will take care of all of it. (The currenty disabled services)
I created a new automated solution:
- add /etc/uci-defaults/ to /etc/sysupgrade.conf
- before "sysupgrade" command execute this line:
for file in /etc/init.d/*; do $file enabled || echo $file disable; done > /etc/uci-defaults/01_disable_services
- after reboot the currently disabled services should be still disabled
edit: does anyone know why it needs a 2nd reboot for this to work?
You're not changing the sysupgrade image so the upgrade loads for the first time with services default enabled and then whatever you have in uci-defaults runs.
2 Likes
how can i fix this for the 1st boot?
I've always simply done my config in /etc/rc.local
so I'm not sure.
Hopefully someone who knows can chime in.