commit:     93777e58b134935a485214e4f13dce2f2cebb800
Author:     Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 29 16:41:40 2021 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sun Aug 29 18:38:33 2021 +0000
URL:        
https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=93777e58

udev: unlink control socket after stopping udevd

Closes: https://bugs.gentoo.org/810928
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
Signed-off-by: William Hubbs <williamh <AT> gentoo.org>

 init.d/udev | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/init.d/udev b/init.d/udev
index 705d87c..724cb82 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -77,9 +77,9 @@ stop() {
        get_udevd_binary || return 1
        ebegin "Stopping ${name:-$RC_SVCNAME}"
        udevadm control --exit ||
-               start-stop-daemon --stop --exec "${command}" --pidfile 
"${pidfile}" &&
-               rm -f "${pidfile}"
+               start-stop-daemon --stop --exec "${command}" --pidfile 
"${pidfile}"
        eend $? "Failed to stop $RC_SVCNAME"
+       [ $? -eq 0 ] && rm -f "${pidfile}" /run/udev/control
 }
 
 reload() {

Reply via email to