findroot hook: use initcpio cmdline variable

Arch's initcpio automatic creates global variables in the form of
variable=y to kernel command line options without a suffix.

See parse_cmdline_item():

https://git.archlinux.org/mkinitcpio.git/tree/init_functions
This commit is contained in:
Marcos Mello 2020-07-10 16:21:42 -03:00
parent ff47811a85
commit 14cf12d01b

View file

@ -1,5 +1,5 @@
run_hook() {
grep -q 'findroot' /proc/cmdline || return
[[ "${findroot}" == "y" ]] || return
# Initialisation
local newroot="/new_root"