From: Philip Prindeville Date: Sun, 11 Aug 2024 21:28:01 +0000 (-0600) Subject: sysupgrade: create 10_disable_services w/ fixed modified time X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F16146%2Fhead;p=thirdparty%2Fopenwrt.git sysupgrade: create 10_disable_services w/ fixed modified time Every time "sysupgrade -b -" runs it would generate a new (synthetic) "/etc/uci-defaults/10_disable_services" file with the current time as the modified time. This unfortunately creates a non-deterministic tarball, so if you run a cron job to save your state, you don't have a trivial way of seeing if it changed or not without unpacking the archive, deleting this file, and comparing the entire directory tree to the previous backup. Fixes: #16145 Fixes: 0ad062a21b ("base-files: sysupgrade: include uci-defaults script disabling services #2") Signed-off-by: Philip Prindeville --- diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade index 75817d178ae..7d4823246ea 100755 --- a/package/base-files/files/sbin/sysupgrade +++ b/package/base-files/files/sbin/sysupgrade @@ -278,7 +278,7 @@ create_backup_archive() { fi done disabled="$disabled\nexit 0" - tar_print_member "/etc/uci-defaults/10_disable_services" "$(echo -e $disabled)" || ret=1 + tar_print_member "/etc/uci-defaults/10_disable_services" "$(echo -e $disabled)" "$(date -r /etc/rc.d "+%s")" || ret=1 fi # Part of archive with installed packages info