commit: ddf1a5a7733b3b4fc5df0fa6f5de70164f080575
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 30 20:58:52 2019 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat Nov 30 21:26:37 2019 +0000
URL:
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=ddf1a5a7
init.d/udev: remove the RC variable from the stop function
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>
init.d/udev | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/init.d/udev b/init.d/udev
index 6aea5a5..4e618ca 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -73,19 +73,12 @@ start_pre() {
}
stop() {
- local rc
- rc=0
+ get_udevd_binary || return 1
ebegin "Stopping ${name:-$RC_SVCNAME}"
- udevadm control --exit
- rc=$?
- if [ $rc -ne 0 ]; then
- eend $rc "Failed to stop $RC_SVCNAME using udevadm"
- ebegin "Trying with start-stop-daemon"
- start-stop-daemon --stop --pidfile "${pidfile}"
- rc=$?
- fi
- [ $rc -eq 0 ] && rm -f "${pidfile}"
- eend $rc "Failed to stop $RC_SVCNAME"
+ udevadm control --exit ||
+ start-stop-daemon --stop --exec "${command}" --pidfile
"${pidfile}" &&
+ rm -f "${pidfile}"
+ eend $? "Failed to stop $RC_SVCNAME"
}
reload() {