diff --git a/main/postmarketos-mkinitfs/APKBUILD b/main/postmarketos-mkinitfs/APKBUILD index 44b5c9415..610607de1 100644 --- a/main/postmarketos-mkinitfs/APKBUILD +++ b/main/postmarketos-mkinitfs/APKBUILD @@ -1,6 +1,6 @@ pkgname=postmarketos-mkinitfs -pkgver=0.9.2 -pkgrel=1 +pkgver=0.10.0 +pkgrel=0 pkgdesc="Tool to generate initramfs images for postmarketOS" url="https://postmarketos.org" # multipath-tools: kpartx @@ -25,5 +25,5 @@ package() { } sha512sums="1d49db8a48ad513cc548b8a0ea23cc64518e71c93863155b4e9d2271fb46090506331c03d6955d693c8568c248ecc76b218efe4a6f6bba57c41c5f6d775dc61b init.sh.in -3bcec7b35ced7e87c301f71a892e54aa40983396e2ebaa3c8cbd84c91f711b3ca0e30fbc3104b1a1018ec1af51844ba90a63d380359b51db6242562d21776ed0 init_functions.sh +315cc6e8a73f9984e6843395d68734d26ac2fffce34039ec5f229ebcd818bdb353318398d6c824cede5d0b36e13d7589a1f1d3295d8162279b5dc6a2b939da88 init_functions.sh 7f7e32588a3658f707a483e2a14ec20396dfabd25f5e86ef2be3055e05ddafcba1285dc9b233c4cdf47424eb71f35dfdc8fd2dc92ff0c76b970981bdfc576475 mkinitfs.sh" diff --git a/main/postmarketos-mkinitfs/init_functions.sh b/main/postmarketos-mkinitfs/init_functions.sh index c58524844..cabefc65f 100644 --- a/main/postmarketos-mkinitfs/init_functions.sh +++ b/main/postmarketos-mkinitfs/init_functions.sh @@ -1,6 +1,7 @@ #!/bin/sh # This file will be in /init_functions.sh inside the initramfs. IP=172.16.42.1 +ROOT_PARTITION_UNLOCKED=0 # Redirect stdout and stderr to logfile setup_log() { @@ -105,10 +106,12 @@ find_root_partition() { # Short circuit all autodetection logic if pmos_root= is supplied # on the kernel cmdline # shellcheck disable=SC2013 - for x in $(cat /proc/cmdline); do - [ "$x" = "${x#pmos_root=}" ] && continue - DEVICE="${x#pmos_root=}" - done + if [ "$ROOT_PARTITION_UNLOCKED" = 0 ]; then + for x in $(cat /proc/cmdline); do + [ "$x" = "${x#pmos_root=}" ] && continue + DEVICE="${x#pmos_root=}" + done + fi # Try partitions in /dev/mapper and /dev/dm-* first if [ -z "$DEVICE" ]; then @@ -211,6 +214,7 @@ unlock_root_partition() { until cryptsetup status root | grep -qwi active; do start_onscreen_keyboard done + ROOT_PARTITION_UNLOCKED=1 # Show again the loading splashscreen show_splash /splash-loading.ppm.gz fi