On 2015-07-13 16:14, Bruno Randolf wrote: > Sometimes it's desirable to be sure that config files from a new firmware > image > overwrite the config files from the previously running firmware and we can not > always expect the user to use 'sysupgrade -n'. In this case the option > TARGET_PREINIT_CONFIG_RESTORE can be set to 'n'. > > This is more useful with a custom uci-default scripts which can selectively > migrate config options, since the the old configuration still exists during > the > first boot in /sysupgrade.tgz until /etc/init.d/done is called. > > Signed-off-by: Bruno Randolf <b...@einfach.org> Unless I'm missing something, this seems like a rarely needed special case to me. How about simply adding a custom preinit file to your firmware through files/ instead? Since the preinit script runs boot_run_hook preinit_mount_root just before the config restore, you should be able to add your code in the right place and use it to delete or move sysupgrade.tgz.
- Felix _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel