procd: detect lxc container and behave accordingly
authorPaul Spooren <mail@aparcar.org>
Sun, 5 May 2019 16:31:41 +0000 (18:31 +0200)
committerHans Dedecker <hans.dedecker@technicolor.com>
Wed, 8 May 2019 11:34:43 +0000 (13:34 +0200)
commit9b354394e2ba818880ba8c65000c417ef1c560a7
treef6901d6406ea069ed08a85b4c5e183df62c422bd
parent01f3dc8b50cf9728c8a70ff9d19143f90c49b786
procd: detect lxc container and behave accordingly

meaning to not mount some specific parts witch cause trouble.

The patch is based on previous work of @mikma to combine OpenWrt with
lxd[0]. This patch however adds a detection copied from *virt-what* to
check /proc/1/environment for the string "container".

Thanks to @dangowrt for the cleanup.

[0]: https://github.com/containercraft/openwrt-lxd/blob/master/patches/procd-openwrt-18.06/001_lxd_no_mounts.patch

Signed-off-by: Paul Spooren <mail@aparcar.org>
container.h [new file with mode: 0644]
initd/early.c
initd/zram.c
plug/coldplug.c