Skip to content

Commit

Permalink
Fix: Don't apply if snapshot is current already
Browse files Browse the repository at this point in the history
  • Loading branch information
laenion committed Jan 13, 2025
1 parent 1535402 commit 9456f6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sbin/transactional-update.in
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ teardown() {
}

do_apply() {
if [ -n "${SNAPSHOT_ID}" -o -n "${ROLLBACK_SNAPSHOT}" -o "${DEFAULT_SNAPSHOT_ID}" != "${CURRENT_SNAPSHOT_ID}" ]; then
if [ -n "${SNAPSHOT_ID}" -o "${ROLLBACK_SNAPSHOT}" -ne 0 -o "${DEFAULT_SNAPSHOT_ID}" != "${CURRENT_SNAPSHOT_ID}" ]; then
NEW_DEFAULT_SNAPSHOT_ID=`btrfs subvolume get-default / | sed -e 's|.*.snapshots/\(.*\)/snapshot|\1|g'`
if ! APPLYWORKDIR="$(mktemp -d /tmp/transactional-update.apply.XXXXXXXX)"; then
log_error "ERROR during apply: Temporary directory template failed."
Expand Down

0 comments on commit 9456f6e

Please sign in to comment.