public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Joonas Niilola" <juippis@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/lxd/files/
Date: Tue, 16 Feb 2021 12:16:47 +0000 (UTC)	[thread overview]
Message-ID: <1613477798.43b0f09708ca0ee5fb22bec6f3c5320b26c8b535.juippis@gentoo> (raw)

commit:     43b0f09708ca0ee5fb22bec6f3c5320b26c8b535
Author:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 16 11:34:40 2021 +0000
Commit:     Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Tue Feb 16 12:16:38 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43b0f097

app-emulation/lxd: rework init.d file shutdown logic

Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>

 app-emulation/lxd/files/lxd-4.0.0.initd | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/app-emulation/lxd/files/lxd-4.0.0.initd b/app-emulation/lxd/files/lxd-4.0.0.initd
index 1cd4da1840b..baec86805c6 100644
--- a/app-emulation/lxd/files/lxd-4.0.0.initd
+++ b/app-emulation/lxd/files/lxd-4.0.0.initd
@@ -29,8 +29,12 @@ start() {
 }
 
 stop() {
-	ebegin "Stopping lxd service (but not containers)."
-	start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE}
-	rm -f ${PIDFILE}
-	eend ${?}
+	if [[ ${RC_GOINGDOWN} = YES ]] || [[ ${RC_REBOOT} = YES ]]; then
+		"${DAEMON}" shutdown
+		rm -f ${PIDFILE}
+	else
+		ebegin "Stopping lxd service (but not containers)."
+		start-stop-daemon --stop --quiet -R TERM/45 -p ${PIDFILE}
+		eend ${?}
+	fi
 }


             reply	other threads:[~2021-02-16 12:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-16 12:16 Joonas Niilola [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-11-15 21:56 [gentoo-commits] repo/gentoo:master commit in: app-emulation/lxd/files/ Conrad Kostecki
2021-03-07  6:32 Joonas Niilola
2021-02-18 17:35 Joonas Niilola
2021-02-16 12:16 Joonas Niilola
2021-02-16  8:33 Joonas Niilola
2017-09-21 12:41 Amy Liffey
2015-11-16  2:54 Erik Mackdanz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1613477798.43b0f09708ca0ee5fb22bec6f3c5320b26c8b535.juippis@gentoo \
    --to=juippis@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox