Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/
Date: Sat, 30 Nov 2019 21:26:54
Message-Id: 1575149197.ddf1a5a7733b3b4fc5df0fa6f5de70164f080575.williamh@gentoo
1 commit: ddf1a5a7733b3b4fc5df0fa6f5de70164f080575
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Sat Nov 30 20:58:52 2019 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 30 21:26:37 2019 +0000
6 URL: https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=ddf1a5a7
7
8 init.d/udev: remove the RC variable from the stop function
9
10 Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
11
12 init.d/udev | 17 +++++------------
13 1 file changed, 5 insertions(+), 12 deletions(-)
14
15 diff --git a/init.d/udev b/init.d/udev
16 index 6aea5a5..4e618ca 100644
17 --- a/init.d/udev
18 +++ b/init.d/udev
19 @@ -73,19 +73,12 @@ start_pre() {
20 }
21
22 stop() {
23 - local rc
24 - rc=0
25 + get_udevd_binary || return 1
26 ebegin "Stopping ${name:-$RC_SVCNAME}"
27 - udevadm control --exit
28 - rc=$?
29 - if [ $rc -ne 0 ]; then
30 - eend $rc "Failed to stop $RC_SVCNAME using udevadm"
31 - ebegin "Trying with start-stop-daemon"
32 - start-stop-daemon --stop --pidfile "${pidfile}"
33 - rc=$?
34 - fi
35 - [ $rc -eq 0 ] && rm -f "${pidfile}"
36 - eend $rc "Failed to stop $RC_SVCNAME"
37 + udevadm control --exit ||
38 + start-stop-daemon --stop --exec "${command}" --pidfile "${pidfile}" &&
39 + rm -f "${pidfile}"
40 + eend $? "Failed to stop $RC_SVCNAME"
41 }
42
43 reload() {