package: live-config
version: 5.20190519

Hi,
the file /lib/live/config/0050-config contains a check for systemd which
happens to be broken:

It checks for the presence of systemd with an "if which systemctl ..."
statement.

        if which systemctl >/dev/null 2>/dev/null; then
            systemctl set-environment "LANG=${_LOCALE}"
        fi

This does not take into account that there may be situations where
systemctl is present, but systemd is not the currently running init
system, like when live-build is called with "--initsystem sysvinit":

Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version       Architecture Description
+++-==============-=============-============-=================================
ii  systemd        241-7~deb10u4 amd64        system and service manager
ii  sysvinit-core  2.93-8        amd64        System-V-like init utilities


The faulty check causes 0050-locales, or rather, systemctl, to throw an
error during startup when the package is installed, but e.g. sysvinit is
the currently running init system.

According to the systemd documentation, the proper way to check whether
or not systemd is the currently running init system is to check for the
presence of the directory /run/systemd/system.

Thus, the check

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

should be changed to

        if [ -d /run/systemd/system ] ; then

Kind Regards,
Stefan Baur
-- 
BAUR-ITCS UG (haftungsbeschränkt)
Geschäftsführer: Stefan Baur
Eichenäckerweg 10, 89081 Ulm | Registergericht Ulm, HRB 724364
Fon/Fax 0731 40 34 66-36/-35 | USt-IdNr.: DE268653243

Reply via email to