Sysupgrade: Preserve startup

My services all get enabled after sysupgrade. How can i preserve my service startup settings including disabled ones?

See here:


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:

  1. add /etc/uci-defaults/ to /etc/sysupgrade.conf
  2. 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
  3. 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.


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.