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

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

On Thu, 2003-04-03 at 07:10, Thomas Hood wrote:

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

You missed the word "configuration".

	...configuration (files AND directories)...

Even if you read it as the IMO wrong

	...(configuration files) AND directories...

then it'd be an empty directory (or at least have no non-configuration

[Think of /etc/network. That's a "configuration directory". So is
/etc/init.d. Or /etc/nut. Or many others --- packages with multiple
config files create them.]

> 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),

mtab is in there for legacy reasons only. Please read the FHS --- it
clearly states so, right under Table

	"mtab does not fit the static nature of /etc: it is
	 excepted for historical reasons.[6]"

Footnote six even explicitly mentions it may be symlinked to
/proc/mounts, to not need this exception.

> and also
> sharper than can easily be drawn in practice.  E.g., is
> resolv.conf a configuration file or a state file?

Configuration. Why wouldn't it be? Just because the dhcp clients write
to it instead of /var/something? (DHCP machines, IMHO, should have a
symlink from /etc/resolv.conf to /var/whatever. Even Mac OS X does
this...) Even better would be an include directive in /etc/resolv.conf,
but you can't have everything ;-)

> The reason for moving the files in question is not that
> they aren't configuration files.

mtab is not a config file by any stretch of the imagination. For one
thing, it is not intended to be edited by a human. It only lists some
parameters for mounted file systems.

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

If done right, /etc could easily be on different file system than /. If
you put run as a subdirectory of /etc, it can't be.

[You'd just need a minimal /etc on the root fs to mount the real /etc on

Reply to: