implement ro/rw

This commit is contained in:
illiliti 2020-04-13 00:54:28 +03:00
parent 9c950d5c63
commit a871eae710

View File

@ -77,6 +77,9 @@ parse_cmdline()
debug | debug=1) debug | debug=1)
set -x set -x
;; ;;
ro | rw)
rorw="-o $line"
;;
*.*) *.*)
# TODO implement backward compatibilty with dracut, mkinitcpio, etc # TODO implement backward compatibilty with dracut, mkinitcpio, etc
: no operation : no operation
@ -192,7 +195,7 @@ mount_root()
findfs "$root" findfs "$root"
set -- "${root_type:+-t $root_type}" "${root_opts:+-o $root_opts}" "$device" "/mnt/root" set -- "${root_type:+-t $root_type}" "${rorw:-o ro}${root_opts:+,$root_opts}" "$device" "/mnt/root"
mount $@ || panic "failed to mount root" mount $@ || panic "failed to mount root"
} }