Re: data files in /etc?
Goswin von Brederlow <firstname.lastname@example.org> writes:
> Magosányi Árpád <email@example.com> writes:
> > Hi!
> > There are some files in /etc which are actually data files representing
> > the state of the system. Like /etc/mtab, /etc/network/ifstate, or
> The BTS has several patches for mount that allow /etc/mtab to be a
> link to another file. Thats an extension to being a link to
> /proc/mounts, which has some drawbacks like breaking loopback mounts.
The /proc/mounts has the drawbacks, the extra paches not.
> For the /etc/network/ifstate afaik someone did a rewrite working
> differently at some stage and the package was fixed to deal with it
> being linked a long time ago.
> > /etc/lvmconf/* (it is not even a text file).
> That can also be linked to another location.
> > These files are written by programs in occasions one cannot with good
> > heart call configuration. Isn't it against the policy?
> The problem is that those files have always been there (historic
> reason) and that they may be needed during boot before any alternative
> place is available (practical reason). They can't be in /var/state if
> that is not yet mounted, on a network filesystem/device or lvm, and so
> on. Check for the discussions about adding /run or /state.
> If they bother you and you know certain conditions don't apply to you
> (like var being on a network device) they can be linked. Arguments
> about the files has repeadatly ended with the compromise to allow them
> to be linked somewhere more fitting for the individual system.
> > There are practical reasons behind my question:
> > -if one uses a configuration management tool (like tla) to track changes
> > in the configuration, one will stumble upon them sooner or later.
> > -if one wants to make the boot process unable to modify configuration,
> > they will also be stumbled upon. (And given the fact that mount
> > actually deletes and recreates /etc/mtab, the challenge is...
> > challenging.)
> Or when you want a read-only / and /usr filesystem.
> Mounting a ramdisk or tmpfs early during boot and linking the files to
> there solves that problem. Note that you need the patch for mount
> otherwise it will try to create /etc/mtab~ and iirc /etc/mtab.tmp or
> To UNSUBSCRIBE, email to firstname.lastname@example.org
> with a subject of "unsubscribe". Trouble? Contact email@example.com