Add detection for rkt containers
This commit is contained in:
parent
9fedb3b40b
commit
a0cf8f9124
@ -215,6 +215,8 @@ Same as -jail, but for Linux Resource Containers (LXC).
|
||||
Same as -jail, but for OpenVZ systems.
|
||||
.It Dv -prefix
|
||||
Same as -jail, but for Prefix systems.
|
||||
.It Dv -rkt
|
||||
Same as -jail, but for RKT systems.
|
||||
.It Dv -uml
|
||||
Same as -jail, but for UML systems.
|
||||
.It Dv -vserver
|
||||
|
@ -267,6 +267,8 @@ rc_sys(void)
|
||||
return RC_SYS_OPENVZ;
|
||||
if (strcmp(systype, RC_SYS_LXC) == 0)
|
||||
return RC_SYS_LXC;
|
||||
if (strcmp(systype, RC_SYS_RKT) == 0)
|
||||
return RC_SYS_RKT;
|
||||
if (strcmp(systype, RC_SYS_SYSTEMD_NSPAWN) == 0)
|
||||
return RC_SYS_SYSTEMD_NSPAWN;
|
||||
if (strcmp(systype, RC_SYS_DOCKER) == 0)
|
||||
@ -288,6 +290,8 @@ rc_sys(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=rkt"))
|
||||
return RC_SYS_RKT;
|
||||
else if (file_regex("/proc/1/environ", "container=systemd-nspawn"))
|
||||
return RC_SYS_SYSTEMD_NSPAWN;
|
||||
else if (file_regex("/proc/1/environ", "container=docker"))
|
||||
|
@ -334,6 +334,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_RKT "RKT"
|
||||
#define RC_SYS_SYSTEMD_NSPAWN "SYSTEMD-NSPAWN"
|
||||
#define RC_SYS_UML "UML"
|
||||
#define RC_SYS_VSERVER "VSERVER"
|
||||
|
Loading…
Reference in New Issue
Block a user