From a871eae710c07f958cdfb1d47cb118f5636857fb Mon Sep 17 00:00:00 2001 From: illiliti Date: Mon, 13 Apr 2020 00:54:28 +0300 Subject: [PATCH] implement ro/rw --- usr/share/tinyramfs/init | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr/share/tinyramfs/init b/usr/share/tinyramfs/init index 0cd4c2b..df2f826 100755 --- a/usr/share/tinyramfs/init +++ b/usr/share/tinyramfs/init @@ -77,6 +77,9 @@ parse_cmdline() debug | debug=1) set -x ;; + ro | rw) + rorw="-o $line" + ;; *.*) # TODO implement backward compatibilty with dracut, mkinitcpio, etc : no operation @@ -192,7 +195,7 @@ mount_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" }