aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-10-22 12:30:05 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-10-22 12:30:05 +0000
commit0760494889f56e7e2f765aa1e4352d78e4e1f7ca (patch)
tree825fa26c94d65ac1cd9390b6cdeee2094efb7d56
parenta039874ec046ab059746f2a188af51d72e793310 (diff)
downloadmkinitfs-0760494889f56e7e2f765aa1e4352d78e4e1f7ca.tar.bz2
mkinitfs-0760494889f56e7e2f765aa1e4352d78e4e1f7ca.tar.xz
init: also pass cryptopts when looking for apkovl/bootrepo
in theory we should be able to have apkovl on LUKS device
-rwxr-xr-xinitramfs-init.in15
1 files changed, 8 insertions, 7 deletions
diff --git a/initramfs-init.in b/initramfs-init.in
index bc26fb1..0834175 100755
--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -341,6 +341,13 @@ if [ -f /etc/modules ] ; then
fi
eend 0
+if [ -n "$KOPT_cryptroot" ]; then
+ cryptopts="-c ${KOPT_cryptroot}"
+ if [ -n "$KOPT_cryptdm" ]; then
+ cryptopts="$cryptopts -m ${KOPT_cryptdm}"
+ fi
+fi
+
# check if root=... was set
if [ -n "$KOPT_root" ]; then
if [ "$SINGLEMODE" = "yes" ]; then
@@ -348,12 +355,6 @@ if [ -n "$KOPT_root" ]; then
sh
fi
- if [ -n "$KOPT_cryptroot" ]; then
- cryptopts="-c ${KOPT_cryptroot}"
- if [ -n "$KOPT_cryptdm" ]; then
- cryptopts="$cryptopts -m ${KOPT_cryptdm}"
- fi
- fi
ebegin "Mounting root"
if [ "$KOPT_overlaytmpfs" = "yes" ]; then
mkdir -p /media/root-ro /media/root-rw $sysroot/media/root-ro \
@@ -385,7 +386,7 @@ fi
# locate boot media and mount it
ebegin "Mounting boot media"
-nlplug-findfs -p /sbin/mdev ${KOPT_debug_init:+-d} \
+nlplug-findfs $cryptopts -p /sbin/mdev ${KOPT_debug_init:+-d} \
${KOPT_usbdelay:+-t $(( $KOPT_usbdelay * 1000 ))} \
-b /tmp/repositories -a /tmp/apkovls
eend $?