@@ -142,13 +142,12 @@ do_save_conffiles() {
}
run_hooks "$CONFFILES" $sysupgrade_init_conffiles
-#if upgrade with save files and dnsmasq running then stop dnsmasq (to update timestamp)
-#and add /etc/dnsmasq.time to archive
-
-#KevinDB: if its a procd service then: ubus call service list '{"name":"dnsmasq"}' | jsonfilter -e '@.*.instances.instance1.running'
- if [ $(ubus call service list '{"name":"dnsmasq"}' | jsonfilter -e '@.*.instances.instance1.running') = "true" ]; then
- /etc/init.d/dnsmasq restart
- echo "/etc/dnsmasq.time" >>$CONFFILES
+ if [ -z $NEED_IMAGE ]; then
+ if [ $(ubus call service list '{"name":"dnsmasq"}' | jsonfilter -e '@.*.instances.instance1.running') = "true" ]; then
+ /etc/init.d/dnsmasq restart
+ sleep 1
+ echo "/etc/dnsmasq.time" >>$CONFFILES
+ fi
fi
ask_bool 0 "Edit config file list" && vi "$CONFFILES"
dnsmasq uses /etc/dnsmasq.time as record of the last known good system time to aid its validation of dnssec timestamps. dnsmasq updates the timestamp on process start/stop once it considers the system time as valid. The timestamp file should be preserved across system upgrade but should not be included as part of normal configuration backups to prevent restores corrupting the current timestamps. Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk> --- package/base-files/files/sbin/sysupgrade | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-)