]> git.ipfire.org Git - thirdparty/dracut.git/blobdiff - modules.d/99base/module-setup.sh
ro_mnt - option at build time to force ro mount of / and /usr
[thirdparty/dracut.git] / modules.d / 99base / module-setup.sh
index f20ca1ae419577db24a9f9948df5a56eea7f3b5e..dde12856ba83076df203aa7b84f5940c08c41ac7 100755 (executable)
@@ -50,6 +50,9 @@ install() {
     fi
 
     ln -fs /proc/self/mounts "$initdir/etc/mtab"
+    if [[ $ro_mnt = yes ]]; then
+        echo ro >> "${initdir}/etc/cmdline.d/base.conf"
+    fi
 
     if [ -e /etc/os-release ]; then
         . /etc/os-release