Skip to content

Commit bdfdb21

Browse files
DaanDeMeyerbluca
authored andcommitted
mkosi: Use authselect local profile if it exists
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) (cherry picked from commit 01e0891)
1 parent 3129bea commit bdfdb21

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

mkosi.presets/20-final/mkosi.postinst

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,17 @@ if [ -n "$IMAGE_VERSION" ] ; then
6565
fi
6666

6767
if command -v authselect >/dev/null; then
68-
authselect select minimal
68+
# authselect 1.5.0 renamed the minimal profile to the local profile without keeping backwards compat so
69+
# let's use the new name if it exists.
70+
if [ -d /usr/share/authselect/default/local ]; then
71+
PROFILE=local
72+
else
73+
PROFILE=minimal
74+
fi
75+
76+
authselect select "$PROFILE"
6977

70-
if authselect list-features minimal | grep -q "with-homed"; then
78+
if authselect list-features "$PROFILE" | grep -q "with-homed"; then
7179
authselect enable-feature with-homed
7280
fi
7381
fi

0 commit comments

Comments
 (0)