From c6c29d7b3837f41797c4bbaafad05c6487166d25 Mon Sep 17 00:00:00 2001 From: Philip Prindeville Date: Sun, 11 Aug 2024 15:28:01 -0600 Subject: [PATCH] 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 --- package/base-files/files/sbin/sysupgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.47.2