diff options
author | David Cortarello <dcortarello@gmail.com> | 2015-03-25 01:48:36 -0300 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2015-03-27 11:34:13 -0400 |
commit | 6a398265f3bd30a252cba2b1ada04ff1c617cf96 (patch) | |
tree | 2a0761e4c4b46b8bb433e24032a4353cab3bed58 /src/shared | |
parent | 3cda11ed7c226adc9f4818cecfb21974239d632b (diff) |
Remove hardcoded path /run and configure using --with-rootrundir=
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/Makefile.am | 1 | ||||
-rw-r--r-- | src/shared/virt.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/shared/Makefile.am b/src/shared/Makefile.am index dde3e27b56..6dfd91f4cf 100644 --- a/src/shared/Makefile.am +++ b/src/shared/Makefile.am @@ -1,6 +1,7 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} AM_CPPFLAGS = \ + -DUDEV_ROOT_RUN=\"$(rootrundir)\" \ -include $(top_builddir)/config.h libudev_shared_la_SOURCES=\ diff --git a/src/shared/virt.c b/src/shared/virt.c index 96b3f5671f..358b4403d2 100644 --- a/src/shared/virt.c +++ b/src/shared/virt.c @@ -63,11 +63,11 @@ int detect_container(const char **id) { } else { /* Otherwise, PID 1 dropped this information into a - * file in /run. This is better than accessing + * file in UDEV_ROOT_RUN. This is better than accessing * /proc/1/environ, since we don't need CAP_SYS_PTRACE * for that. */ - r = read_one_line_file("/run/systemd/container", &m); + r = read_one_line_file(UDEV_ROOT_RUN "/systemd/container", &m); if (r == -ENOENT) { r = 0; goto finish; |