mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-01-22 00:04:31 +03:00
initcpio: small improvements to the mkinitcpio hooks
This commit is contained in:
parent
c2af793c8c
commit
77d72319a4
@ -1,14 +1,15 @@
|
||||
#!/usr/bin/ash
|
||||
|
||||
run_hook() {
|
||||
|
||||
# check if $root needs unlocking
|
||||
if bcachefs unlock -c $root >/dev/null 2>&1; then
|
||||
echo "Unlocking $root:"
|
||||
while true; do
|
||||
bcachefs unlock $root && break
|
||||
done
|
||||
fi
|
||||
local rootdev
|
||||
if rootdev="$(resolve_device "$root")" && bcachefs unlock -c "$rootdev" >/dev/null 2>&1
|
||||
then
|
||||
echo "Unlocking $rootdev:"
|
||||
while true
|
||||
do
|
||||
bcachefs unlock "$rootdev" && break
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
# vim: set ft=sh ts=4 sw=4 et:
|
||||
|
@ -1,15 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
build() {
|
||||
add_module `bcachefs`
|
||||
add_binary "bcachefs"
|
||||
|
||||
add_runscript
|
||||
add_module bcachefs
|
||||
add_binary bcachefs
|
||||
|
||||
add_runscript
|
||||
}
|
||||
|
||||
help() {
|
||||
cat <<HELPEOF
|
||||
cat <<HELPEOF
|
||||
This hook is for getting the bcachefs unlock prompt at boot
|
||||
HELPEOF
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user