Skip to content

Commit

Permalink
mkosi: Use authselect local profile if it exists
Browse files Browse the repository at this point in the history
authselect 1.5.0 removed the "minimal" profile and added the "local"
profile instead. Let's modify our post-installation script to take
these changes into account.

(cherry picked from commit 166bcaf)
  • Loading branch information
DaanDeMeyer authored and keszybz committed Jan 23, 2024
1 parent 29ea9f0 commit af30578
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions mkosi.images/system/mkosi.postinst.chroot
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,17 @@ if [ -n "$IMAGE_VERSION" ] ; then
fi

if command -v authselect >/dev/null; then
authselect select minimal
# authselect 1.5.0 renamed the minimal profile to the local profile without keeping backwards compat so
# let's use the new name if it exists.
if [ -d /usr/share/authselect/default/local ]; then
PROFILE=local
else
PROFILE=minimal
fi

authselect select "$PROFILE"

if authselect list-features minimal | grep -q "with-homed"; then
if authselect list-features "$PROFILE" | grep -q "with-homed"; then
authselect enable-feature with-homed
fi
fi
Expand Down

0 comments on commit af30578

Please sign in to comment.