Merge pull request #353 from nnathan/improvements_to_initcpio

initcpio: small improvements to the mkinitcpio hooks
This commit is contained in:
koverstreet 2024-12-01 19:26:50 -05:00 committed by GitHub
commit 51ebefdd6e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 13 deletions

View File

@ -1,12 +1,13 @@
#!/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
bcachefs unlock "$rootdev" && break
done done
fi fi
} }

View File

@ -1,11 +1,10 @@
#!/bin/bash #!/bin/bash
build() { build() {
add_module `bcachefs` add_module bcachefs
add_binary "bcachefs" add_binary bcachefs
add_runscript add_runscript
} }
help() { help() {