Comment 33 for bug 1771858

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

We have codepaths with and without initrd, which results in different environment that systemd starts up with.

In bionic, initramfs-tools sets PATH to PATH=/sbin:/usr/sbin:/bin:/usr/bin

In later releases, initramfs-tools sets PATH to
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

And systemd can come up without initrd (lxd) in which case PATH is not set at all, and internally systemd uses the built-in compiled PATH.

The snapd environment generator has been fixed to handle the case of empty or unset PATH. But it only appends the snapd path, meaning that it doesn't inject /usr/local into the PATH.