# The design of /etc



## BlueCoder (Apr 1, 2015)

Just wondering if anyone else agrees with me. /etc is large and confused should have been split up in it's evolution.

To me /etc should be config files without any read only scripts. Better yet if it started out as an empty directory with another directory being defaults. System script directories such as rc.d and periodic should outright be in another directory branch maybe in bin, or libexec.

On a side note anyone know where the naming of libexec came from? To me I always just think service/daemon. Also why doesn't a root-level libexec exist?

P.S. I know it will never change.


----------



## ANOKNUSA (Apr 1, 2015)

/etc is the location for files designated for system configuration. It's true that there are scripts there, but they're scripts that constitute the configuration of a running system, not stand-alone, interactive executables. That's my take on it, anyway. I can see e.g. /etc/periodic residing in /usr/libexec. /usr/local/etc/periodic makes sense to me, though, since it's the location for user-created scripts used to configure automatic system processes.


----------



## kpa (Apr 1, 2015)

It really should be reworked into something like what the NanoBSD uses, the /conf directory that could live on its own read/write filesystem with the rest of the system mounted read-only.


----------



## ANOKNUSA (Apr 1, 2015)

kpa said:


> It really should be reworked into something like what the NanoBSD uses, the /conf directory that could live on its own read/write filesystem with the rest of the system mounted read-only.



Would /var necessarily be on its own partition to keep things working, then? It's not a bad idea to put it on its own partition on FreeBSD anyway, but wherever it goes it needs write permissions...


----------



## kpa (Apr 1, 2015)

ANOKNUSA said:


> Would /var necessarily be on its own partition to keep things working, then? It's not a bad idea to put it on its own partition on FreeBSD anyway, but wherever it goes it needs write permissions...



Yes certainly, /var would have to be its own filesystem with R/W permissions.


----------

