Skip to content

Commit

Permalink
sysupgrade: create 10_disable_services w/ fixed modified time
Browse files Browse the repository at this point in the history
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

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
  • Loading branch information
pprindeville committed Aug 13, 2024
1 parent ccc06f6 commit 6fe2371
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package/base-files/files/sbin/sysupgrade
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,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 -d "$(ls --full-time -ld /etc/rc.d | cut -c45-63)" "+%s")" || ret=1
fi

# Part of archive with installed packages info
Expand Down

0 comments on commit 6fe2371

Please sign in to comment.