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

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



On Thu, Apr 03, 2003 at 02:10:39PM +0200, Thomas Hood wrote:
> On Thu, 2003-04-03 at 10:51, Bernhard R. Link wrote:
> > The problem are state (and thus non-configuration) files
> > in a place where they do not belong to making it impossible
> > to mount /etc readonly.

> 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.

> 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.

This is not how I understand the description.  I understand it to mean
"/etc contains configuration files and directories [containing
configuration files] that are specific to the current system."  Your
reading implies that it's ok to throw any old system-specific crap into
a subdirectory of /etc, and still be FHS-compliant.

> 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?

No, mtab is there for historical reasons.  It's a singular taxonomic wart
that, unlike most other historical baggage, no one saw fit to address
during the process of the FHS's formulation.  In part, I think this is
because people have been symlinking /etc/mtab to /proc/mounts, but this
fix has its limitations.  In a sense, this is not so much a case of the
FHS saying mtab belongs in /etc, as it is that the FHS saying it doesn't
belong in any of the other directories currently available.

> 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.

The FHS is about more than just providing a system that technically
allows you to mount different filesystems as needed.  There are also
aesthetic concerns in the heirarchy (in the broad sense of creating a
system which follows a set of simple principles), and I believe /etc/run
violates that aesthetic whereas /run does not.

But while I disagree with your arguments and felt they warranted a
rebuttal, for reasons previously explained I do not oppose moving forward
with an /etc/volatile or /etc/run directory as an interim solution.

-- 
Steve Langasek
postmodern programmer

Attachment: pgpmai3Ueocpi.pgp
Description: PGP signature


Reply to: