[openwrt/openwrt] sysupgrade: create 10_disable_services w/ fixed modified time
LEDE Commits
lede-commits at lists.infradead.org
Sat May 31 12:03:52 PDT 2025
dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c6c29d7b3837f41797c4bbaafad05c6487166d25
commit c6c29d7b3837f41797c4bbaafad05c6487166d25
Author: Philip Prindeville <philipp at redfish-solutions.com>
AuthorDate: Sun Aug 11 15:28:01 2024 -0600
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 <philipp at redfish-solutions.com>
---
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 75817d178a..7d4823246e 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
More information about the lede-commits
mailing list