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 17, 2024
1 parent b72c4b5 commit b8d9b85
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 b8d9b85

Please sign in to comment.