aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-03-28 19:06:22 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2022-03-28 19:07:02 +0000
commit97ec07080c19b1bcb9a3e3d1bc64067486c996ff (patch)
tree78ecd4cf165263dc0e598de06154489c3e2dec38
parent79778912c5a1bbe3e585c1180304a8cadc2e53af (diff)
main/lxc: fix poweroff/reboot signals for systemd containers
fixes https://gitlab.alpinelinux.org/alpine/aports/-/issues/13646
-rw-r--r--main/lxc/APKBUILD4
-rw-r--r--main/lxc/lxc.initd6
2 files changed, 8 insertions, 2 deletions
diff --git a/main/lxc/APKBUILD b/main/lxc/APKBUILD
index 4d5e9412f45..7a7686974ba 100644
--- a/main/lxc/APKBUILD
+++ b/main/lxc/APKBUILD
@@ -4,7 +4,7 @@
pkgname=lxc
pkgver=4.0.12
_pkgver=${pkgver/_rc/.rc}
-pkgrel=0
+pkgrel=1
pkgdesc="Userspace interface for the Linux kernel containment features"
url="https://linuxcontainers.org/lxc/"
arch="all"
@@ -169,6 +169,6 @@ bashcomp() {
sha512sums="
04437d9c891cd3a22f756c42f05e97398772587175d65aff9d394f0f3e810efc5c1fe7077c39573de3ec259e0605bc2a7ea51093613b2cef908372ae338df19d lxc-4.0.12.tar.gz
-b74ffe7c3e8f193265a90ffeb6e5743b1212bc1416b898e5a7e59ddd7f06fc77dc34e2dcbb3614038ac6222a95e2b9beb9f03ab734c991837203ab626b1b091f lxc.initd
+db71783366277a68a5c8116604cf845da4780fe4aebdb5820ae2c4fe028cfe52a9c94246db362476f2f195be6a9c2b835edbe521423f116fc66eb50023d6daab lxc.initd
91de43db5369a9e10102933514d674e9c875218a1ff2910dd882e5b9c308f9e430deacb13d1d7e0b2ed1ef682d0bb035aa6f8a6738f54fa2ca3a05acce04e467 lxc.confd
"
diff --git a/main/lxc/lxc.initd b/main/lxc/lxc.initd
index aab7147f74c..210a1269fa9 100644
--- a/main/lxc/lxc.initd
+++ b/main/lxc/lxc.initd
@@ -134,6 +134,9 @@ stop() {
_autostart "Stopping" --shutdown --timeout ${LXC_TIMEOUT:-30}
return
fi
+ if yesno "$systemd_container"; then
+ : ${POWEROFF_SIGNAL=-38}
+ fi
ebegin "Stopping container ${CONTAINER}"
start-stop-daemon --stop --pidfile ${pidfile} \
@@ -148,6 +151,9 @@ reboot() {
_autostart "Rebooting" --reboot
return
fi
+ if yesno "$systemd_container"; then
+ : ${RESTART_SIG=39}
+ fi
ebegin "Sending reboot signal to container $CONTAINER"
start-stop-daemon --signal ${RESTART_SIG:-SIGTERM} \