summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <sven.eden@gmx.de>2019-01-11 08:36:47 +0100
committerSven Eden <sven.eden@gmx.de>2019-01-11 08:37:02 +0100
commit43ef49ff6084a37282d987acaa72e0a1c51b77c6 (patch)
tree63ec5394fe2eb936560984f587f1edb0db06c469
parentx11-misc/bumblebee: Fix uvm support patch (diff)
downloadseden-43ef49ff6084a37282d987acaa72e0a1c51b77c6.tar.gz
seden-43ef49ff6084a37282d987acaa72e0a1c51b77c6.tar.bz2
seden-43ef49ff6084a37282d987acaa72e0a1c51b77c6.zip
sys-auth/elogind: Send SIGINT instead of SIGTERM when restartingHEADmaster
This utilizes the new handling of SIGINT to make restarting less difficult in >=elogind-239.4. Signed-Off-By: Sven Eden <sven.eden@gmx.de> Package-Manager: Portage-2.3.54, Repoman-2.3.12
-rw-r--r--sys-auth/elogind/files/elogind.init17
1 files changed, 14 insertions, 3 deletions
diff --git a/sys-auth/elogind/files/elogind.init b/sys-auth/elogind/files/elogind.init
index 019c3af..5ea0be5 100644
--- a/sys-auth/elogind/files/elogind.init
+++ b/sys-auth/elogind/files/elogind.init
@@ -1,5 +1,5 @@
#!/sbin/openrc-run
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
depend() {
@@ -19,7 +19,18 @@ start() {
}
stop() {
- ebegin "Stopping elogind"
- start-stop-daemon --stop --quiet --pidfile "${ELOGIND_PIDFILE}"
+ local stop_timeout="SIGTERM/10/SIGKILL/3"
+
+ if [ ${RC_CMD} = "restart" ] ; then
+ ebegin "Interrupting elogind"
+ stop_timeout="SIGINT/10/SIGINT/5/${stop_timeout}"
+ else
+ ebegin "Stopping elogind"
+ fi
+
+ start-stop-daemon --stop --quiet \
+ --retry ${stop_timeout} \
+ --pidfile "${ELOGIND_PIDFILE}"
+
eend $?
}