]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
sysupgrade: create 10_disable_services w/ fixed modified time 16146/head
authorPhilip Prindeville <philipp@redfish-solutions.com>
Sun, 11 Aug 2024 21:28:01 +0000 (15:28 -0600)
committerPhilip Prindeville <philipp@redfish-solutions.com>
Sat, 31 May 2025 17:18:50 +0000 (11:18 -0600)
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>
package/base-files/files/sbin/sysupgrade

index 75817d178aea1806ae5466faf50aca39ec662c86..7d4823246ea1a234be3c7384799d30da626f6ff1 100755 (executable)
@@ -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