[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ifupdown writes to /etc... a bug?

* Thomas Hood <jdthood0@yahoo.co.uk> [030403 14:38]:
> If I understand correctly, your two issues are:
> (1) that state files are not configuration files and
> so do not belong under /etc; (2) the presence of state
> files in /etc/makes it impossible to mount /etc readonly.

My point is that statefiles do not belong in a hirachy
reserved for configuration-files (as configuration files
are no state-files).

The problems occuring mounting it a readonly are only sympoms
of the problem. Comparing /etc of to different machines to
compare configuration, or even unpacking a privious tar'ed
/etc-directory to restore an old configuration or other such things 
will show symptoms, too.

> 1. On what grounds to you assert that state files don't
> "belong" under /etc?  You quote the FHS:
> > /etc contains configuration files and directories that
> > are specific to the current system.  [FHS 3.4]
> The proposed /etc/run is a directory specific to the
> current system, so it seems to meet the stated criterion.

It may be a directory specific to the current system, but
not a configuration directory specific to the current system.

> I think you are drawing a distinction between "configuration"
> and "state" files that is sharper than intended by the FHS
> (... otherwise mtab wouldn't be in there), and also
> sharper than can easily be drawn in practice.  E.g., is
> resolv.conf a configuration file or a state file?

State might not be the term used by FHS. FHS generally
distinguished between configuration and things only data.
Data is under /var/lib and /var/run (depending on state
living over reboot and state cleared with reboot).

This was not so clearly in former times and moving of utmp
from /etc to /var/run shows it is itended.

/etc/resolv.conf is another beast. libc is not ready for
changing nameservers. Changing it is an ugly (and not
working in all situations as many pointed out) hack, that
has to be addressed with a real solution.

> 2. The writability issue is taken care of by moving the
> state files under a subdirectory of /etc which can be
> used as the mount point for a rw filesystem if /etc is
> on a ro filesystem.

This sympom might be cured. But one has a directory under /etc
then that is not a configuration directory.

  Bernhard R. Link

Sendmail is like emacs: A nice operating system, but missing
an editor and a MTA.

Reply to: