state: fix shutdown when running in a container (FS#2425)
authorPaul Spooren <mail@aparcar.org>
Mon, 5 Aug 2019 16:07:45 +0000 (18:07 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Mon, 5 Aug 2019 19:44:23 +0000 (21:44 +0200)
commit832369078d818d19ab64051fdc8da9e06c90ad88
treefab9840ba19e20701cae4ece1904920ce27ff88a
parent31f0765afd61f55b1dd2cdb62ec1968efca19690
state: fix shutdown when running in a container (FS#2425)

Applies patch from @mikma [0] to fix Docker shutdown. Added detection to
state.c if running in a container or not.

Tested with a x86/64 Docker image.

Fixes FS#2425

CC: Mikael Magnusson <mikma@users.sourceforge.net>
CC: Petr Štetiar <ynezz@true.cz>
[0]: https://github.com/mikma/lxd-openwrt/blob/master/patches/procd-master/0003-docker-fix-problem-stopping-container.patch

Signed-off-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [coding style aligment]
state.c