luks: add use/luks/touchscreen, add alterator-luks to distro targets only

alterator-luks used only in the installer.
The new target leverages the new make-initrd feature luks-unl0kr,
which allows entering the luks password on the touchscreen.
Needed plymouth.
This commit is contained in:
Anton Midyukov 2024-08-15 07:28:38 +03:00
parent 962a40cc72
commit 6b61320c79
2 changed files with 17 additions and 1 deletions

View File

@ -3,6 +3,12 @@ LUKS_LISTS := $(call tags,security luks)
use/luks:
@$(call add_feature)
@$(call add,BASE_PACKAGES,make-initrd-luks)
@$(call add,BASE_PACKAGES,alterator-luks)
@$(call add,THE_LISTS,$(LUKS_LISTS))
@$(call add,RESCUE_LISTS,$(LUKS_LISTS))
ifeq (distro,$(IMAGE_CLASS))
@$(call add,BASE_PACKAGES,alterator-luks)
endif
use/luks/touchscreen: use/luks use/plymouth/base
@$(call add,BASE_PACKAGES,unl0kr)
@$(call add,VM_INITRDMODULES,drivers/input/touchscreen)

View File

@ -0,0 +1,10 @@
#!/bin/sh -efu
CONFIG="/etc/initrd.mk"
if [ -f "$CONFIG" ]; then
grep -qw luks "$CONFIG" || echo 'FEATURES += luks' >> "$CONFIG"
if rpm -q unl0kr; then
grep -qw luks-unl0kr "$CONFIG" ||
echo 'FEATURES += luks-unl0kr' >> "$CONFIG"
fi
fi