main/postmarketos-initramfs: enable auto unlocking with cryptkey arg
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8863>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
|
||||
maintainer="Casey Connolly <kcxt@postmarketos.org>"
|
||||
pkgname=postmarketos-initramfs
|
||||
pkgver=3.12.0
|
||||
pkgver=3.12.1
|
||||
pkgrel=0
|
||||
pkgdesc="Base files for the postmarketOS initramfs / initramfs-extra"
|
||||
url="https://postmarketos.org"
|
||||
@@ -112,8 +112,8 @@ ace852ba267b3408998970df6042603c8bec1d033066d1c30ed65f1be955fee8644b57882898f102
|
||||
69852928464f01757e2f473bd2c2e7ecb4132ecf3e26bdec95932e928dfe9042f59316e0a509fd38bcda88e24dd94bf33e8a88118b5adbec7023d1c13da12f59 00-initramfs-base.files
|
||||
6d91270b96ce0c745391174201dde63b43a73ae6456c2e1138046beef3548580588fedbeae7cc914079162e99343b45d82c6e6a7ee1d03829aae7697ae52f575 00-initramfs-extra-base.files
|
||||
bd72e8b6345a46ec13516c64d78d4fa1a9a18a8db9ab04aac605f9708629453dc65b6fbccd96b58eeb1ea68102ddbcae9dc6b369255c6c6c1fb18ce0bd43ec79 init.sh
|
||||
1c1518e903a1d08fe6eed85534fe84d12f43bb5fbfbca97de8aed78f30ddf96ebc2391d39eab02d8689549ca1367f422182995a26e5fda284afea024c433b1b9 init_functions.sh
|
||||
e4d08332eedc1863f5d08968f5ef06463075d5c1922d1bdf73859bf620b545ba76dee84792ebad393bc018e1a32ee570068d3a612f51a42eb47924be7f8c3ecc init_functions.sh
|
||||
7aa82d5e2907470d667612643d98371dff27b2650051f8c568ab43d1b97677362c3e6fbd442474086d681ea7c0cfbcaf269d3eef2d2dc3ff4ebf17c786b82148 init_2nd.sh
|
||||
4eca94327274511011967cde1f663b00b1a8182f7dddc3ba19d5c1f0ac094087a154a250c140ca70ac75a2e7c5bb70b03e94fa5eca63a5393efc4a23d025e1c3 init_functions_2nd.sh
|
||||
59f1e8954483dfe49182ddbaf0c1a4741f147161b92b5bb836e5bd405b419438f5757915546b46b846193c5a4b44c4b1a523f0ad0dcb87a1dfcaed9360e03146 init_functions_2nd.sh
|
||||
675e7d5bee39b2df7d322117f8dcaccc274d61beaf4d50ead19bbf2109446d64b1c0aa0c5b4f9846eb6c1c403418f28f6364eff4537ba41120fbfcbc484b7da7 mdev.conf
|
||||
"
|
||||
|
||||
@@ -105,6 +105,10 @@ parse_cmdline_item() {
|
||||
# shellcheck disable=SC2034
|
||||
log_info=y
|
||||
;;
|
||||
cryptkey)
|
||||
# shellcheck disable=SC2034
|
||||
cryptkey="$value"
|
||||
;;
|
||||
[![:alpha:]_]* | [[:alpha:]_]*[![:alnum:]_]*)
|
||||
# invalid shell variable, ignore it
|
||||
;;
|
||||
|
||||
@@ -98,6 +98,9 @@ resize_root_partition() {
|
||||
unlock_root_partition() {
|
||||
command -v cryptsetup >/dev/null || return
|
||||
if cryptsetup isLuks "$PMOS_ROOT"; then
|
||||
if [ -f "$cryptkey" ]; then
|
||||
cryptsetup luksOpen "$PMOS_ROOT" root --key-file="$cryptkey"
|
||||
fi
|
||||
splash_hide
|
||||
tried=0
|
||||
until cryptsetup status root | grep -qwi active; do
|
||||
|
||||
@@ -21,7 +21,7 @@ start_test "Ensure all boolean variables can be set"
|
||||
# shellcheck disable=SC3001
|
||||
parse_cmdline < <(echo \
|
||||
pmos.bootchart2 pmos.debug-shell pmos.force-partition-resize \
|
||||
splash pmos.stowaway rd.info \
|
||||
splash pmos.stowaway rd.info cryptkey=/keyfile \
|
||||
)
|
||||
|
||||
assert_equal "bootchart2" "y"
|
||||
@@ -29,6 +29,7 @@ assert_equal "debug_shell" "y"
|
||||
assert_equal "force_partition_resize" "y"
|
||||
assert_equal "nosplash" "n"
|
||||
assert_equal "log_info" "y"
|
||||
assert_equal "cryptkey" "/keyfile"
|
||||
end_test
|
||||
|
||||
### Test 2 ###
|
||||
|
||||
Reference in New Issue
Block a user