All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] systemd: override the path for kill, sulogin, mount and umount
@ 2015-09-01 14:53 Vicente Olivert Riera
  0 siblings, 0 replies; only message in thread
From: Vicente Olivert Riera @ 2015-09-01 14:53 UTC (permalink / raw
  To: buildroot

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 <Vincent.Riera@imgtec.com>
---
 package/systemd/systemd.mk |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index b62fc08..24c4373 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -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
-- 
1.7.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-01 14:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-01 14:53 [Buildroot] [PATCH] systemd: override the path for kill, sulogin, mount and umount Vicente Olivert Riera

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.