systemd: override the path for kill, sulogin, mount and umount
PATCH 1/1 systemd: override the path for kill, sulogin, mount and umount
On distros where /bin and /sbin are symlinks to their counterparts in /usr, systemd finds kill, sulogin, mount and umount under /usr/bin or /usr/sbin. We need to override the path for those programs and set the ones that systemd will find in Buildroot. Otherwise we will end up with a broken systemd causing errors like this one:
[ 15.152482] mount[81]: dev-mqueue.mount: Failed at step EXEC spawning
/usr/bin/mount: No such file or directory
Or this one:
emergency.service: Executing: /bin/sh -c '/usr/bin/sulogin; /bin/systemctl --job-mode=fail --no-block default' /bin/sh:/usr/bin/sulogin: not found
Signed-off-by Vicente Olivert Riera <[email protected]>
--- package/systemd/systemd.mk | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
package/systemd/systemd.mk +10 -0
@@ -51,6 +51,16 @@ SYSTEMD_CONF_ENV = \ CFLAGS="$(SYSTEMD_CFLAGS)" \ ac_cv_path_KMOD=/usr/bin/kmod +# On distros where /bin and /sbin are symlinks to their counterparts in +# /usr, systemd finds kill, sulogin, mount and umount under /usr/bin or +# /usr/sbin. We need to override the path for those programs and set the +# ones that systemd will find in Buildroot. +SYSTEMD_CONF_ENV += \ + ac_cv_path_KILL=/bin/kill \ + ac_cv_path_SULOGIN=/sbin/sulogin \ + ac_cv_path_MOUNT_PATH=/bin/mount \ + ac_cv_path_UMOUNT_PATH=/bin/umount + ifeq ($(BR2_PACKAGE_SYSTEMD_COMPAT),y) SYSTEMD_CONF_OPTS += --enable-compat-libs else
Signature · 1 line
1.7.1