From f60d42e9019cff6c641a93f4030c71a6efe5846c Mon Sep 17 00:00:00 2001 From: Sören Tempel Date: Mon, 20 Jun 2022 05:08:32 +0200 Subject: init.d/root: also remount / with options provided in /etc/fstab Without this commit, the root OpenRC service remounts all mounted filesystems (except /) with the options defined in /etc/fstab via fstabinfo. It is presently unclear to me why / was excluded from remounting in 497ff7ee41168d863971efb52e2ca6b42f765832 and unfortunately neither the commit nor the associated Bugzilla issue [1] provides further information on this. At Alpine, our initramfs does currently not remount / with all options defined in /etc/fstab [2]. As part of the discussion on the Alpine side of things we wondered why OpenRC does not remount / since this would be the easier solution for us. For this reason, this commit changes the behavior of the OpenRC root services accordingly to also remount / with the options defined in /etc/fstab. [1]: https://bugs.gentoo.org/401573 [2]: https://gitlab.alpinelinux.org/alpine/mkinitfs/-/merge_requests/103 This fixes #533. --- init.d/root.in | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/init.d/root.in b/init.d/root.in index 045bcd0f..32ecdcbb 100644 --- a/init.d/root.in +++ b/init.d/root.in @@ -48,14 +48,8 @@ start() ebegin "Remounting filesystems" local mountpoint for mountpoint in $(fstabinfo); do - case "${mountpoint}" in - /) - ;; - /*) - mountinfo -q "${mountpoint}" && \ - fstabinfo --remount "${mountpoint}" - ;; - esac + mountinfo -q "${mountpoint}" && \ + fstabinfo --remount "${mountpoint}" done eend 0 } -- cgit v1.2.3