summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoonas Niilola <juippis@gentoo.org>2021-02-16 10:27:59 +0200
committerJoonas Niilola <juippis@gentoo.org>2021-02-16 10:29:42 +0200
commit9f88706ccb6f6582b42ff558d679ebe39bc6fb93 (patch)
tree8e3abd41299f01d9abcebd2e568a3a7602299949 /app-emulation/lxd/files
parentdev-python/gitdb: keyworded 4.0.5-r1 for ppc64 (diff)
downloadgentoo-9f88706ccb6f6582b42ff558d679ebe39bc6fb93.tar.gz
gentoo-9f88706ccb6f6582b42ff558d679ebe39bc6fb93.tar.bz2
gentoo-9f88706ccb6f6582b42ff558d679ebe39bc6fb93.zip
app-emulation/lxd: don't shutdown all cluster instances with service
Closes: https://bugs.gentoo.org/770511 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'app-emulation/lxd/files')
-rw-r--r--app-emulation/lxd/files/lxd-4.0.0.initd25
1 files changed, 3 insertions, 22 deletions
diff --git a/app-emulation/lxd/files/lxd-4.0.0.initd b/app-emulation/lxd/files/lxd-4.0.0.initd
index 03ec12e44f56..51284f6e2ae1 100644
--- a/app-emulation/lxd/files/lxd-4.0.0.initd
+++ b/app-emulation/lxd/files/lxd-4.0.0.initd
@@ -1,13 +1,11 @@
#!/sbin/openrc-run
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
DAEMON=/usr/sbin/lxd
PIDFILE=/run/lxd.pid
TIMEOUT=10
-extra_commands="stopall"
-
depend() {
need net
need lxcfs
@@ -31,24 +29,7 @@ start() {
}
stop() {
- if [[ ${RC_GOINGDOWN} = YES ]] || [[ ${RC_REBOOT} = YES ]]; then
- stopall
- else
- ebegin "Stopping lxd service (but not containers)."
- start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE}
- eend ${?}
- fi
-}
-
-stopall() {
- ebegin "Stopping lxd service and containers."
- lxc stop --all --timeout $TIMEOUT >/dev/null 2>&1
- if [[ ${?} -ne 0 ]]; then
- lxc stop --all --force || eerror "Could not stop all containers."
- fi
- if "${DAEMON}" shutdown; then
- rm -f ${PIDFILE}
- eend 0
- fi
+ ebegin "Stopping lxd service (but not containers)."
+ start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE}
eend ${?}
}