[PATCH] Migrate from /var/run to /run

Jouke Witteveen j.witteveen
Sat Feb 2 14:11:47 PST 2013


On Sat, Feb 2, 2013 at 10:52 PM, Jouni Malinen <j at w1.fi> wrote:
> On Mon, Jan 28, 2013 at 11:34:33AM +0100, Jouke Witteveen wrote:
>> Follow an FHS proposal[1] that is already implemented on some major
>> distributions.
>>
>> [1] https://bugs.linuxfoundation.org/show_bug.cgi?id=718
>
> How many of those distributions that have implemented this do not have a
> symlink from /var/run to /run? I'm apparently using one system where
> that change has happened, but to this date, I had not noticed any issues
> with using /var/run never mind being aware of such change having
> occurred. It would sound more likely to me that new systems have such
> symlink than older ones handle /run.. Not that this really should matter
> much since apart from the wpa_gui one (and wpa_priv, which almost nobody
> uses), these should all be configurable at both build and runtime.

There is a reason for the migration
---quote Matthew Miller------
System services / applications need to store run-time variable data
somewhere before /var/run may be available.
---end quote------

This would make /run a sensible default. The main problem with the
buildtime configuration is that the choice is not reflected in the
documentation. In other words: there is a hardcoded choice in the
documentation.

> Please also note that wpa_supplicant and hostapd are supposed to work on
> systems other than Linux, too.. In addition, many Linux systems seem to
> be happily using other locations even without this patch.

I didn't really think of that. It sounds like a good reason to not
take the patch as-is. Just for laughs: /var/run does not appear in any
Unix Directory Structure standard I could find.

> Actually.. That proposal seems to indicate that programs may continue to
> use /var/run for the purposes of backwards compatibility and some linked
> discussion seemed to indicate that programs "should" and not just "may"
> do so.. Could you please provide a pointer to the FHS draft that
> justifies this change for wpa_supplicant or use cases where /run has to
> be used instead of /var/run?
>
> It would sound simplest to continue using /var/run since FHS
> specification seems to indicate that this directory is required to exist
> (e.g., as a symlink or some other means of linking it to to /run). This
> would not cause problems for existing systems or non-Linux platforms and
> should continue to work with new Linux systems for that matter.

Indeed, these observations are enough reason to keep things the way
they are. At least it has now turned from a convention into a decision
:-).

Regards,
- Jouke



More information about the Hostap mailing list