git: rc.d: Add mounttmpfs to support tmpfs at /var/run and /tmp
Aaron LI
aly at crater.dragonflybsd.org
Wed Apr 29 06:32:35 PDT 2020
commit 80d125ead8e978ee0bbb457e6ca8c13577a15660
Author: Aaron LI <aly at aaronly.me>
Date: Wed Apr 29 12:47:23 2020 +0800
rc.d: Add mounttmpfs to support tmpfs at /var/run and /tmp
We are already mounting a tmpfs at /var/run/shm to support shm_open()
etc functions. However, this makes it harder for a user to make
/var/run on a tmpfs. Actually, using a tmpfs for /var/run is a good
idea, though the deamons/system need to create necessary folders, and
Linux has adopted such a model for /run (symlink to /var/run) for years.
Introduce the 'mounttmpfs' rc script to support mounting tmpfs at
/var/run and /tmp, which is enabled by setting 'tmpfs_var_run=YES'
and 'tmpfs_tmp=YES' in /etc/rc.conf, respectively. The default values
for these two new configurations are both 'NO'.
The new 'mounttmpfs' rc script is ordered *after* 'mountcritremote', so
that NFS-mounted /var is also properly handled, although I think
NFS-mounted /var is not a good idea and I don't know anyone really need
to do so.
Also move the tmpfs mounting at /var/run/shm from 'mountcritlocal' to
the new 'mounttmpfs' script.
Reviewed-by: tuxillo
Summary of changes:
etc/defaults/rc.conf | 4 +++-
etc/rc.d/Makefile | 3 ++-
etc/rc.d/SERVERS | 4 ++--
etc/rc.d/mountcritlocal | 5 -----
etc/rc.d/mounttmpfs | 37 +++++++++++++++++++++++++++++++++++++
share/man/man5/rc.conf.5 | 19 ++++++++++++++++++-
6 files changed, 62 insertions(+), 10 deletions(-)
create mode 100644 etc/rc.d/mounttmpfs
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/80d125ead8e978ee0bbb457e6ca8c13577a15660
--
DragonFly BSD source repository
More information about the Commits
mailing list