diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/librc/librc.c | 2 | ||||
-rw-r--r-- | src/librc/rc.h.in | 1 |
2 files changed, 3 insertions, 0 deletions
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; diff --git a/src/librc/rc.h.in b/src/librc/rc.h.in index 58d8eb57..13e1b5b9 100644 --- a/src/librc/rc.h.in +++ b/src/librc/rc.h.in @@ -332,6 +332,7 @@ bool rc_service_daemons_crashed(const char *); #define RC_SYS_OPENVZ "OPENVZ" #define RC_SYS_LXC "LXC" #define RC_SYS_PREFIX "PREFIX" +#define RC_SYS_SYSTEMD_NSPAWN "SYSTEMD-NSPAWN" #define RC_SYS_UML "UML" #define RC_SYS_VSERVER "VSERVER" #define RC_SYS_XEN0 "XEN0" |