diff options
author | William Hubbs <williamh@gentoo.org> | 2019-11-30 14:58:52 -0600 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2019-11-30 15:26:37 -0600 |
commit | ddf1a5a7733b3b4fc5df0fa6f5de70164f080575 (patch) | |
tree | 3ec5585e9a38acf23d118d9f396310206ef8fc78 | |
parent | init.d: style fixes (diff) | |
download | udev-gentoo-scripts-ddf1a5a7733b3b4fc5df0fa6f5de70164f080575.tar.gz udev-gentoo-scripts-ddf1a5a7733b3b4fc5df0fa6f5de70164f080575.tar.bz2 udev-gentoo-scripts-ddf1a5a7733b3b4fc5df0fa6f5de70164f080575.zip |
init.d/udev: remove the RC variable from the stop function
Signed-off-by: William Hubbs <williamh@gentoo.org>
-rw-r--r-- | init.d/udev | 17 |
1 files 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() { |