On a system built without systemd, I'm getting this error after running "opkg upgrade" (for example between yocto 4.2.2 and 4.2.3): Configuring systemd-compat-units //var/lib/opkg/info/systemd-compat-units.postinst: cd: line 3: can't cd to /etc/init.d: No such file or directory This happens because of the way the existence of /etc/init.d/ is tested. If the directory doesn't exist, the "cd" command issues an error.
Proposed a fix: https://lists.openembedded.org/g/openembedded-core/message/191055
Fixed by https://git.openembedded.org/openembedded-core/commit/?id=0330331a1386fd2a34b410a7f62b29bfc8dc23c4