Estimated read time: 2 minutes
So we have this systemd wip repo and one of the remaining todo items was to fix up splashy to work with systemd.
First, why doesn’t it out of the box of systemd is a drop-in
replacement? Because splashy is not a simple init script, it hooks
itself to rc.sysvinit
, so it was specific to sysvinit.
Now given that plymouth was already ported to systemd, it served as a good example. You may also ask: why don’t we just switch to plymouth? Because:
-
we don’t want to introduce multiple changes at the same time
-
it requires kms, while Splashy did not require it - so as long as it’s not true that most video cards support kms (think of via or anything else which supports vesafb, but not kms), such a switch would be a regression
Okay, enough anti-Plymouth rant. As you can see, right now the task is to fix Splashy.
The steps I did were:
-
updated the Splashy theme to remove the progressbar: given that now we start services parallel and on-demand, it does not really make too much sense
-
introduced unit files: to start on boot, to stop before getty/xorg, to start before kexec/reboot/halt/poweroff
-
added the usual compatibility symlinks to avoid starting the old rc.splash (which would happen anyway)
-
added a simple wrapper that fires up splashy and once it’s ready it sends the Booting…/Rebooting…/etc text to it
The last problem is a bit more complex: now that xorg startup wants to
stop splashy, a dependency has to be declared. xorg startup is handled
by prefdm.service
, but in case it depends on splashy-quit.service
,
what will happen if you don’t have or don’t want a splash?
The solution for now is to declare an After=
relation: that means xorg
startup will happen after the quit of splashy, if it happens at all.
This way:
-
you can disable the splash, it won’t cause any dependency errors
-
if you don’t have
prefdm.service
enabled, you can even have splashy uninstalled -
(this one is a bit ugly) you can disable the splash, but if you uninstall it and have
prefdm.service
enabled, you’ll get a dependency error, as systemd will have no idea whatsplashy-quit.service
is.
To test the above:
-
you need to enable the systemd wip repo (see the link above)
-
run
pacman-g2 -Sy systemd
-
boot with
init=/bin/systemd
Stay tuned, we still have a few blocker issues before merging the (disabled by default, as you need that kernel parameter) systemd support to current.