]> code.ossystems Code Review - openembedded-core.git/commit
systemd.bbclass: update command to check systemctl available
authorKai Kang <kai.kang@windriver.com>
Wed, 2 Dec 2020 02:21:45 +0000 (10:21 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 6 Dec 2020 23:16:50 +0000 (23:16 +0000)
commita52e66762c0c51918b1ba3d4622759637b6e920a
treeadc3aecc129d506c840cc994069628b56d83befe
parent811ebb4adc5cfcc24ac4460fe89fe68d8d03d837
systemd.bbclass: update command to check systemctl available

When use a core image with systemd as docker image, it fails to
install/remove package which calls systemctl in post scripts.
It fails to run systemctl in a container:

bash-5.0# systemctl
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down

So replace the criterion command 'type systemctl' with 'systemctl' in
package post scripts to check whether systemctl available.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/systemd.bbclass