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