Restore config and startup state of init.d and rc.d services

Anyway, indeed a combination of your and my suggestions works quite well:

  • Add a link to a non existing file that can be saved as disabled state.
    The fake link even nicely shows as 'disabled' in Luci.
  • add to the sysupgrade.conf which states you want to save.
## This file contains files and directories that should
## be preserved during an upgrade.

# /etc/example.conf
# /etc/openvpn/
/etc/init.d/wifi-disconnect-low-signal
/usr/bin/wifi-disconnect-low-signal.lua

# add this folder to also save startup state of installed packages
# add link to non-existing file disabled to also save/restore disabled state of any services
# example: ln -s -f  ../init.d/disabled S60dnsmasq
/etc/rc.d/S19firewall
/etc/rc.d/S50telnet 
/etc/rc.d/S50uhttpd
/etc/rc.d/S60dnsmasq 
/etc/rc.d/S99wifi-disconnect-low-signal
2 Likes