omacom/omarchy#13362 sets HOOKS per platform inside 00-omarchy-hooks.conf, with no column-0 HOOKS= line, so the aarch64 build failed on it; settings-dev tracks quattro automatically and would break as soon as it lands. Wrap only a single-line HOOKS=(...), refuse any other column-0 HOOKS=, then source the shipped files onto a Mac line and a stock line: the Mac line must come through unchanged and the stock one must not. Back up 00-omarchy-hooks.conf when it ships, and refuse it without the omarchy-hw-platform copy it asks. The test now uses the real v4.0.4 hooks file, #13362's two files and omarchy-mac-boot's 90-94 fragments, and covers upgrades over a hand-restored file.
47 lines
2.3 KiB
Plaintext
47 lines
2.3 KiB
Plaintext
# The disk passphrase prompt types with the owner's keyboard layout, as on
|
|
# x86 Omarchy: sd-vconsole loads KEYMAP on the console (systemd-ask-password)
|
|
# and /etc/vconsole.conf gives Plymouth its XKBLAYOUT. The aarch64
|
|
# omarchy-settings drops upstream's omarchy_hooks.conf, so this drop-in
|
|
# carries its guard: a layout that does not type Latin letters stays out of
|
|
# the initramfs, because a Latin passphrase would be untypeable in it
|
|
# (upstream #6229). The prompt then uses the kernel's US map, which is what
|
|
# such a passphrase was typed with.
|
|
#
|
|
# A systemd HOOKS line gets sd-vconsole exactly once, after keyboard (or
|
|
# after systemd without one); keymap and consolefont are its busybox
|
|
# counterparts and never belong on such a line. A busybox line (a Mac
|
|
# unlocked by cryptdevice=, which 91 leaves alone) keeps its hooks; it only
|
|
# gets the file for Plymouth, as upstream does.
|
|
# No vconsole.conf is the kernel's US map: sd-vconsole stays, nothing to bundle.
|
|
_omarchy_mac_vconsole_latin=true
|
|
if [[ -f /etc/vconsole.conf ]]; then
|
|
_omarchy_mac_vconsole_layout=$(unset XKBLAYOUT; . /etc/vconsole.conf 2>/dev/null; printf '%s' "${XKBLAYOUT:-}")
|
|
case ${_omarchy_mac_vconsole_layout%%,*} in
|
|
af | am | ara | bd | bg | by | et | ge | gr | il | in | iq | ir | kg | kh | kz | la | lk | mk | mm | mn | mv | np | rs | ru | sy | th | tj | ua)
|
|
_omarchy_mac_vconsole_latin=false ;;
|
|
esac
|
|
fi
|
|
|
|
if [[ " ${HOOKS[*]} " == *" systemd "* ]]; then
|
|
_omarchy_mac_vconsole_hooks=()
|
|
_omarchy_mac_vconsole_anchor=systemd
|
|
[[ " ${HOOKS[*]} " != *" keyboard "* ]] || _omarchy_mac_vconsole_anchor=keyboard
|
|
for _omarchy_mac_vconsole_hook in "${HOOKS[@]}"; do
|
|
case $_omarchy_mac_vconsole_hook in
|
|
sd-vconsole | keymap | consolefont) continue ;;
|
|
esac
|
|
_omarchy_mac_vconsole_hooks+=("$_omarchy_mac_vconsole_hook")
|
|
if [[ $_omarchy_mac_vconsole_hook == "$_omarchy_mac_vconsole_anchor" && $_omarchy_mac_vconsole_latin == true ]]; then
|
|
_omarchy_mac_vconsole_hooks+=(sd-vconsole)
|
|
_omarchy_mac_vconsole_anchor=
|
|
fi
|
|
done
|
|
HOOKS=("${_omarchy_mac_vconsole_hooks[@]}")
|
|
fi
|
|
|
|
if [[ $_omarchy_mac_vconsole_latin == true && -f /etc/vconsole.conf ]]; then
|
|
FILES+=(/etc/vconsole.conf)
|
|
fi
|
|
unset _omarchy_mac_vconsole_latin _omarchy_mac_vconsole_layout _omarchy_mac_vconsole_hooks \
|
|
_omarchy_mac_vconsole_anchor _omarchy_mac_vconsole_hook
|