Re: [RFC] Should /proc/(foo) be /etc/dynamic/(foo) ?

From: dg50@daimlerchrysler.com
Date: Wed May 03 2000 - 11:01:52 EST


Alexander Demenshin <aldem-linux@aldem.net> wrote:

> On Tue, May 02, 2000 at 02:02:25PM -0400, dg50@daimlerchrysler.com wrote:

>> 1) The use of ASCII text files for system/program configuration is a
>> Goodness.

> So-so - it is good for humans but not so good for computers (why should
> some process parse configuration every time?

Because it makes scripting and other manipulations soooo much nicer.

This particular debate (binary config files for speed, ASCII config files
for human-friendliness) has been covered in great detail in the /proc
debates of late, and The Linus has come down quite heavily on the side of
ASCII files - and did a great job of explaining why. The same principles
apply here.

Now if only they all used the same format... *sigh*

I think there is room for a "config file reading/parsing/writing" system
library so that at least the wheel need not be re-invented over and over
again, but that's an entirely userspace app - unless the kernel wanted
config files, and wanted to use the library too.

>> 2) Grouping these ASCII configuration files in a common place (instead of
>> scattering them throughout the system) is also a goodness

> Sure - good idea.

>> 3) There exists a mountpoint that (mostly) contains these files in a
>> (mostly) common space - /etc

> In this case - why /etc? Why not /config, /system or /setup? If you plan to change
> defaults anyway - why not to choose the proper name? ;)

Mostly because of 3 decades of UNIX history. When one proposes to start
tipping sacred cows, one is perhaps better off only tipping the cows that
need to be tipped. ;)

But I do like /config - and it does have the advantage of being a clean
namespace.

>> 4) This implies that /etc, as well as being a filesystem, is also a
>> hierarchical registry/namespace of sorts. Poorly organized, with way too
>> much stuff at the root level of the hierarchy, but still a registry.

> You forgot about /usr(/local)?/lib - also a lot of config files and so on.

Quite right - all the config stuff should go in the same place, and it
should be organized in a manner that makes logical sense.

>> 2) Move the special files that change system operation/configuration out of
>> /proc (which really should be just for processes) into an /etc root level
>> mountpoint, perhaps as /etc/dynamic or some such.

> Well... I see that this is for Linux 3.* :)) Nice idea, though... At current
> stage it can be implemented using symlinks, BTW. Like:

> /config/kernel -> /proc/sys

Yeah, a lot of this could be simulated by symlinking things all over the
place, and this makes a nifty porting/proof of concept process. In fact,
one could implement /config as described above in its entirety by
symlinking everything in the /config filesystem to the targets in their
"real" homes in /etc, /usr/lib, /proc, whatever.

But the idea is to get rid of all that stuff in strange places and make the
"real" home be the /config filesystem.

>> 3) On a related pet peeve, standardize on a ~/etc directory to store
>> user-specific configuration files/directories, instead of a billion
>> freakin' dotfiles in the user root directory

> This point is related nearly exclusively to user space, so it is better to discuss
> it with application developers (ha-ha, lets try to do it) :)) You just cannot force
> authors to use it with help of kernel :)

Very true - but where the Kernel Developers go, the rest of the world
follows. A statement from The Linus, Alan, and the rest of the Beatles to
the effect that "All system-wide config files should go in a hierarchic
ally-organized, root-level /config directory, and accordingly, we're
providing an option to mount the dynamic configuration "magic" files (that
used to be in /proc) at /config/dynamic" would make for one hell of a first
push.

With that done, it'd be a little easier to get patches to FSF etc. software
that moved their config files to the /config hierarchy applied.

It'd be nice to see devfs' config file live in /config/devices/devfs.cfg
too....

The idea to get the LSB folks involved is also a good one - are any of
these folks reading this thread?

As for the "It's Not UNIX" argument... sure it is. It's just fixing
broken/confusing behaviour, which is supposed to be a UNIX hallmark. And
besides, it's starting to look like Linux is becoming the Definitive UNIX.
;)

With a properly working devfs mounted at /devices, and a nicely-organized
and complete /config filesystem, you get a system that's much nicer to
administer.

The one potential problem I see is that if /config is the root level, then
it can be mounted anywhere - it could be NFS, it could be one of any number
of filesystems (FAT?), or it could be missing completely. How then should
the kernel code handle that, if it wants to put the "magic files" at
/config/dynamic, and there is no /config mountpoint?

DG

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:12 EST