1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-12 08:58:20 +03:00

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 166bcaf95fbdd036f99705d2204138c36eb95836)
This commit is contained in:
Daan De Meyer 2024-01-22 12:04:45 +01:00 committed by Luca Boccassi
parent 2bc6ad67a3
commit 01e0891f7e

View File

@ -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
if authselect list-features minimal | grep -q "with-homed"; then
authselect select "$PROFILE"
if authselect list-features "$PROFILE" | grep -q "with-homed"; then
authselect enable-feature with-homed
fi
fi