From c709e6077c6eda3f4f7e7222298213413254ee0f Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Tue, 28 Apr 2015 15:07:21 -0500 Subject: Add support for systemd-nspawn containers This adds support for running OpenRC in a container created by the systemd-nspawn utility. This fixes #52. X-Gentoo-Bug: 548058 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=548058 --- src/librc/librc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/librc/librc.c') diff --git a/src/librc/librc.c b/src/librc/librc.c index ca51aa61..03448e79 100644 --- a/src/librc/librc.c +++ b/src/librc/librc.c @@ -294,6 +294,8 @@ rc_sys_v1(void) return RC_SYS_OPENVZ; /* old test */ else if (file_regex("/proc/1/environ", "container=lxc")) return RC_SYS_LXC; + else if (file_regex("/proc/1/environ", "container=systemd-nspawn")) + return RC_SYS_SYSTEMD_NSPAWN; #endif return NULL; -- cgit v1.2.3