Ephemeral /var/run and creating port-specific subdir at service startup time

Mark Martinec Mark.Martinec+freebsd at ijs.si
Wed Aug 31 23:12:53 UTC 2016


I prefer to have a /var/run file system reside on a tmpfs
as its contents is small and ephemeral in its nature (like
pid files, lock files, sockets), need not be preserved across
reboots, and should not have to depend on any physical disk.

The problem is that some programs/services/ports like to create
their own subdirectory under /var/run. This works fine if such
subdirectory is created (when missing) by their rc.d script,
such as salt, dbus, jenkins, clamav-clamd, isc-dhcpd, kibana.

Unfortunately there are other ports which create a subdirectory
under /var/run at the installation time (pkg install). In this
case their subdirectory is missing on a reboot when /var/run
is re-created afresh, and they fail to start.

So my question is: are such ports (like influxdb, grafana3)
which do not create their subdirectory at a startup time
in error and a bug report is warranted, or am I wrong in
expecting that /var/run may be ephemeral and is such a setup
(as is common in Linux) unsupported?

   Mark


More information about the freebsd-ports mailing list