summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinit10
1 files changed, 8 insertions, 2 deletions
diff --git a/init b/init
index c34eac8..9488750 100755
--- a/init
+++ b/init
@@ -20,6 +20,7 @@ export QUIET=0
export INTERACTIVE=0
export ROOTDEV=''
export CRYPTROOT=''
+export MOUNTOPTS=()
screen_init() {
# Clear screen
@@ -36,8 +37,10 @@ screen_init() {
mount_fakeroot() {
local rootdev=${1}
local fakeroot=${2}
+ shift && shift
+ local opts=(${@})
- mount -o ro ${rootdev} ${fakeroot}
+ mount -o ro ${opts[@]} ${rootdev} ${fakeroot}
}
@@ -91,6 +94,9 @@ parse_cmdline() {
CRYPTROOT="$(echo ${i} | cut -d '=' -f 2)"
fi
;;
+ subvol=*)
+ MOUNTOPTS+=(-o subvol=${i#*=})
+ ;;
initdebug)
# Enable debug mode (this is gonna be slow)
DEBUG=1
@@ -227,7 +233,7 @@ main() {
# Mount the fakeroot.
log INFO "Mounting fakeroot"
- mount_fakeroot ${ROOTDEV} ${fakeroot}
+ mount_fakeroot ${ROOTDEV} ${fakeroot} ${MOUNTOPTS[@]}
# Ensure switch_root will be possible for destination fakeroot
if [ ! -f "${fakeroot}/sbin/init" ]; then

Generated by cgit