From ddf1a5a7733b3b4fc5df0fa6f5de70164f080575 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Sat, 30 Nov 2019 14:58:52 -0600 Subject: init.d/udev: remove the RC variable from the stop function Signed-off-by: William Hubbs --- 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() { -- cgit v1.2.3-65-gdbad