diff --git a/init.d/root.in b/init.d/root.in index 0a059a2fb..df68c4364 100644 --- a/init.d/root.in +++ b/init.d/root.in @@ -20,7 +20,8 @@ depend() start() { - case ",$(fstabinfo -o /)," in + local root_opts=",$(fstabinfo -o /)," + case "$root_opts" in *,ro,*) ;; *) @@ -45,6 +46,21 @@ start() ;; esac + case "$root_opts" in + *,shared,*|*,rshared,*) + ebegin "Making root filesystem shared" + case "$RC_UNAME" in + Linux) + mount --make-rshared / + ;; + *) + ewarn "Ignoring 'shared' option for / on non-linux" + ;; + esac + eend $? "Root filesystem could not be mounted read/write" + ;; + esac + ebegin "Remounting filesystems" local mountpoint for mountpoint in $(fstabinfo); do