From 489413c913af0708e9cfad987d6b3385d904e1ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Tempel?= Date: Mon, 20 Jun 2022 19:04:49 +0200 Subject: [PATCH] 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 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/init.d/root.in b/init.d/root.in index 045bcd0f..2f7d82f2 100644 --- a/init.d/root.in +++ b/init.d/root.in @@ -49,9 +49,7 @@ start() local mountpoint for mountpoint in $(fstabinfo); do case "${mountpoint}" in - /) - ;; - /*) + /*) # Don't remount swap etc. mountinfo -q "${mountpoint}" && \ fstabinfo --remount "${mountpoint}" ;;