summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Prindeville2024-08-11 21:28:01 +0000
committerPhilip Prindeville2025-05-31 17:18:50 +0000
commitc6c29d7b3837f41797c4bbaafad05c6487166d25 (patch)
tree57d7841499ebb81d75de1318f8b0187f593460f0
parent30cdc48360db37251fddbed71c7a175239f63b55 (diff)
downloadopenwrt-c6c29d7b3837f41797c4bbaafad05c6487166d25.tar.gz
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@redfish-solutions.com>
-rwxr-xr-xpackage/base-files/files/sbin/sysupgrade2
1 files changed, 1 insertions, 1 deletions
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