Running a systemd-based Gentoo system

Gustavo Sverzut Barbieri barbieri at
Tue Sep 7 22:20:36 PDT 2010

On Wed, Sep 8, 2010 at 2:04 AM, Michael Biebl <mbiebl at> wrote:
> 2010/9/8 Gustavo Sverzut Barbieri <barbieri at>:
>>  - calling any of /etc/init.d scripts is bad, as it will call openrc
>> and it will bring all dependencies on its own, including services
>> managed by systemd that are up already. This means we better disable
>> sysv support there (more on this later).
> Not sure if disabling sysv support is good idea.
> Without knowing too much about Gentoo and simply looking at what the
> Gentoo handbook has to say about Gentoo init scripts [1],
> why don't you simply provide an /sbin/runscript implementation which
> works with systemd?
> That's probably the way I would try to tackle this.
> Or is your plan to rip all native Gentoo init scripts at once and
> replace them with native systemd service files and have a flag day?
> I don't think such an approach will provide a maintainable and smooth
> transition.

Well, it's a complex matter. Gentoo was one of the first to provide
parallel startup and easy/simple/powerful initscripts, but they came
with a price: they opted to do so using Bash and providing/calling
some functions. This is simple, extensible but these are not always

For instance, the parallelization in gentoo also implies pulling deps.
So start ssh and it will start network, etc. The network may be up
because connmand/networkmanager are running, but gentoo will not know
and will execute its own stuff :-/

Another problem is to interpret runscript/initscript files, because it
is too flexible, people write things like this:
 As you can see, while in theory they are easy to parse as they are
often: depend() { need x y z; uses a b c; }, the xdm init does lots of
bash foo to determine the correct dependencies and this breaks systemd
completely :-/

Thus my short term goal is to go with a pure-systemd machine, but of
course this does not scale to all systems and having it to be accepted
upstream is difficult. Not to say update all
documentation/handbooks... actually they even don't recommend
openrc/baselayout2 and it is couple of years old yet!

I don't have a problem with maintaining my stuff, as in a way or
another all Gentoo user must do it. However I believe once Fedora14/15
and others spread the systemd usage,  and we have more packages that
have upstreamed systemd units, like udev, dbus, bluez, ... we can
easily request them to accept an use flag to allow
installing/configuring with such support. That's the hardest bit for


Gustavo Sverzut Barbieri embedded systems
MSN: barbieri at
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

More information about the systemd-devel mailing list