From 6f98cf89f54a9ad1c9625577d100f6ca8b8a2b0b Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Wed, 20 Feb 2019 10:53:59 -0600 Subject: Do not use the --daemon option in the udev service script Using this option does not allow OpenRC to show the status correctly since udevd doesn't write a pid file. We need to create the pidfile ourselves. Signed-off-by: William Hubbs --- init.d/udev | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/init.d/udev b/init.d/udev index 6ff21b2..d0f9d61 100644 --- a/init.d/udev +++ b/init.d/udev @@ -2,7 +2,9 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -command_args="--daemon ${udev_opts}" +command_args="${udev_opts}" +command_background=yes +pidfile=/run/udev.pid description="udev manages device permissions and symbolic links in /dev" extra_started_commands="reload" description_reload="Reload the udev rules and databases" @@ -79,11 +81,11 @@ stop() rc=$? if [ $rc -ne 0 ]; then eend $rc "Failed to stop $RC_SVCNAME using udevadm" - get_udevd_binary || return 1 ebegin "Trying with start-stop-daemon" - start-stop-daemon --stop --exec ${command} + start-stop-daemon --stop --pidfile "${pidfile}" rc=$? fi + [ $rc -eq 0 ] && rm -f "${pidfile}" eend $rc "Failed to stop $RC_SVCNAME" } -- cgit v1.2.3-65-gdbad