[Bug 267846] rc.conf: var_run_enable="YES" without any effect on tmpfs:/var/run

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 12 Mar 2024 14:43:44 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=267846

Tomoaki AOKI <junchoon@dec.sakura.ne.jp> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |junchoon@dec.sakura.ne.jp

--- Comment #4 from Tomoaki AOKI <junchoon@dec.sakura.ne.jp> ---
Not a fix, but just a workaround.

Run `serivce var_run save` as root before shutdown.
Maybe because of the problem, it seems to be kept, but if something new which
requires new directory structute in /var/run but creates them only installation
are added, this should be done again.

Put script below in /etc/rc.conf[.local]. An example for environments having
clamav installed. As rc.conf is actually a /bin/sh script, this worked for me.
The actual process (`test` to redirection) are borrowed from /etc/rc.d/var_run.

if [ ! -d /var/run/clamav ] ; then
  test -f ${var_run_mtree} && \
    mtree -U -i -q -f ${var_run_mtree} -p /var/run > /dev/null
fi

-- 
You are receiving this mail because:
You are the assignee for the bug.