[OE-core] [PATCH 6/9] systemd: allow postinsts to run without systemd being present

Enrico Scholz enrico.scholz at sigma-chemnitz.de
Tue Mar 12 10:36:38 UTC 2013


Ross Burton <ross.burton-ral2JQCrhuEAvxtiuMwx3w at public.gmane.org>
writes:

> These fragments may be used on a system that didn't actually boot with
> systemd, so check for systemctl first, and don't force systemd to be
> installed.

Checking for existence of programs in scriplets is a bad hack which
might hide real problems and the scriplets are getting more complicated
by this.

Placing scriplets and related files into separate subpackages is a much
cleaner solution.


> +if which systemctl >/dev/null; then

check with the shell builtin 'type $prog' is more portable and does not
require the external 'which' program.



Enrico




More information about the Openembedded-core mailing list