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

Re: Debian systemd survey



Vincent Lefevre <vincent@vinc17.net> writes:

> Most config files are not really user-editable under Debian. I mean:
> they can be editable, but there are serious drawbacks during upgrades.
> Indeed most often the user has the choice between installing the new
> version (but his local changes are lost) and keeping the old version
> (but he doesn't benefit from new features, and worse, the old version of
> the config file is not guaranteed to work well with the new version of
> the package). The user can also start a shell to do the merge on his
> side, but this may take time... So, splitting config files is a way to
> avoid that, not in all cases but in most cases (this is not specific to
> sysvinit, apparently just a consequence of the old wishlist bug 32877,
> from 1999!).

> Aren't systemd and upstart config files affected by this problem?

They are somewhat, but it's much less bad because they're so simple.  You
don't have to write nearly as much there, and if you design them
carefully, you can reduce even that complexity.  My impression so far is
that systemd has taken this even farther than upstart, but I've not done
an exhaustive comparison.

As a result, the config files look rather a lot like /etc/default files,
and are amenable to a similar merge process: look at each setting, since
there's only a handful, and think about which setting you want.

For example, here's the complete systemd file for rsyncd:

[Unit]
Description=fast remote file copy program daemon
ConditionPathExists=/etc/rsyncd.conf

[Service]
ExecStart=/usr/bin/rsync --daemon --no-detach

[Install]
WantedBy=multi-user.target

There's really no reason to have something like an /etc/default setting
for that, the way there is for the rsyncd init script.  You can just edit
that directly (well, it's systemd, so you have to copy it into /etc and
make a new version and then won't know if anything about the default
changes -- a truly awful design, but that's another argument).

Now, rsyncd is one of the simplest init scripts, and more complicated
services aren't quite that nice.  But they stay surprisingly simple.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: