Mailinglist Archive: opensuse (1698 mails)

< Previous Next >
Re: [opensuse] Re: starting the virtualbox virtual machines automatically
jdd said the following on 12/26/2011 09:18 AM:
Le 26/12/2011 14:16, Anton Aylward a écrit :

How come you feel bad about putting something in /lib (or presumably
/bin) and not in /etc?

and it's an other place to backup. I always backup /home and /etc here
most if not all the scripts and config reside. Spread configs all over
the system is not a good idea.

Well, there is that, but the reality is that the configs are all over
the place.

If you run chrooted DNS for example, the stuff in in /var/lib or
somewhere like that. If you run a web server then you have config stuff
under /srv. If you run KDE and KDM then you have stuff in
/usr/share/kde4/config/kdm/kdmrc. If you've installed global versions
of new icon sets, new screen savers, new desktop effects, new fonts,
other than though a repository/rpm, you'll have no record of them other
than if you keep written logs.

And then there's that bloody awful stuff about flash ..

As they say ... "In an Ideal World ..."
But "Reality Bites".

How about /usr/lib or /usr/bin?

it's not a binary

I'm sorry, what's that got to do with things?
There are files in both that are shell scripts, data, gifs, INI files,

try running
file /usr/lib/* /usr/lib/*/* | \
egrep -v "ELF|symbolic|directory|archive|libtool|DLL"

If its supposed to go in /lib then its supposed to go in /lib because
that's where the software (systemd) will look for it.

well, in openSUSE there is a folder in /etc, I wonder if it's not done
for such things - I lt /lib for application originated ones

Have you read the MAN page? Or run 'strings' on /bin/systemd (which
shows up a few more places it looks for config like under /usr/local)
or looked at the source? Have you seen the part of the man page where
it says
The systemd system manager reads unit configuration from
various directories. Packages that want to install unit files
shall place them in the directory returned by pkg-config
systemd --variable=systemdsystemunitdir.
Other directories checked are /usr/local/share/systemd/system
and /usr/share/systemd/system. User configuration always takes
precedence. pkg-config systemd --variable=systemdsystemconfdir
returns the path of the system configuration directory.
Packages should alter the content of these directories only
with the enable and disable commands of the systemctl(1) tool.

My point here is really that yes, if you don't know what you're doing
than doing things as root can screw up your system, but you can screw it
up just as well by putting an init function in /etc/systemd/ as in
/lib/system. Or for that matter under SysVInit putting it in

it's not a matter of screwing my system than maintaining my system
over time, backing it up, etc.

Over the decades I've seen more and more migrate to /etc, even if only
as symlinks :-/ But new stuff comes along and makes a mockery of all
that. I quote some examples above. There's always good reasons.

For example, in a reasonably ideal world, /etc/should be, if not
mounted on a RO file system, the severely access restricted -- root only.
But in practice, many of those things need to be dynamically re-written.
The Named files for example. Life is possible without root, but it
takes juggling of the /etc/group file and access permissions and stuff
and stuff and not everyone can grok it. So we end up with "the mess
we're in". They say the road to hell is paved with good intentions; the
path that led us here is full of good justifications for each decision.

One way of looking at the way SystemD works is that what's in
/etc/systemd/system/ are not the control files. They all live in
/lib/systemd anyway. What /lib/systemd amounts to is a library and the
items are enabled by having a link to them in /etc/systemd/

By this reasoning you should put your file in /lib/systemd and have a
symlink in /etc/systemd

Take a look at the files under /etc/systemd/system/
Apart from the system.conf they are all symlinks.
/lib/systemd is where the files actually live.

Much as I hate to admit it, the Windows Registry does at least mandates
all being in one place, but then again, it has a lot of undocumented
crud compared to text file and still has many people and applications
(not least of all malware) fiddling in it.

"A PICTURE IS WORTH A THOUSAND WORDS--But it uses up a thousand times
the memory."
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups