I actually wrote a patch to that a while back, and it was not accepted.
Looking back, I am not disappointed that it was rejected, and it forced
me to find another solution: shell scripts, included below.
However, in light of what Theo said, I'm possibly going to move back to
mfs; even if I haven't had any issues with tmpfs yet, I feel
the need to be somewhat proactive.
Whilst not exactly Michelangelo's finest work of art, it's probably
better than the original set of patches I submitted.
I use the following in /etc/fstab:
swap /var/log tmpfs.sh rw,nodev,noexec,nosuid,-s=64M,-P=/M/var/log
Stored in /sbin/mount_tmpfs.sh:
#!/bin/sh
while getopts :g:m:n:o:P:s:u: OPT; do
if [ "$OPT" == 'P' ]; then
TEMPLATE=$OPTARG
else
MCPARAM="$MCPARAM -$OPT $OPTARG"
fi
done
shift `expr $OPTIND - 1`
/sbin/mount_tmpfs $MCPARAM $*
if [ "$TEMPLATE" != "" ]; then
shift `expr $# - 1`
(cd "$TEMPLATE"; /bin/pax -rw -pe . "$1")
fi
On Tue, 3 May 2016 04:57:54 -0400
Jiri B <[email protected]> wrote:
> On Tue, May 03, 2016 at 05:08:06PM +1000, [email protected]
> wrote:
> > With tmpfs being in the tree for the last 2+ years (since OpenBSD
> > 5.5), I would like to ask, besides the "-P" option in mount_mfs,
> > what is the advantage of using mfs over tmpfs?
>
> tmpfs on Bitrig does support snapshots, which can be used as an
> alternative to mpf's "-P". If you are interested check it out.
>
> j.