Skip to content

Commit

Permalink
feat(rollback-helper): use bootc switch if layering is locked (#1915)
Browse files Browse the repository at this point in the history
  • Loading branch information
tulilirockz authored Nov 17, 2024
1 parent c1bd534 commit 915478e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions system_files/shared/usr/bin/ublue-rollback-helper
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,16 @@ function rebase_helper(){
fi
echo "Rebase Target is ${rebase_target}"
echo "Confirm Rebase"
if [[ $(Confirm) -eq "0" ]]; then
rpm-ostree rebase ostree-image-signed:docker://"${rebase_target}"
else
if [[ $(Confirm) -ne "0" ]]; then
return 1
fi

if /usr/bin/grep "^LockLayering=true" /etc/rpm-ostreed.conf &> /dev/null; then
pkexec bootc switch --enforce-container-sigpolicy "${rebase_target}"
return 0
fi
rpm-ostree rebase ostree-image-signed:docker://"${rebase_target}"
return 0
}

echo "Choose your action."
Expand Down

0 comments on commit 915478e

Please sign in to comment.