diff options
author | 2013-01-21 13:27:49 -0600 | |
---|---|---|
committer | 2013-01-21 13:27:49 -0600 | |
commit | 2af15ef2231161205a25723fefd9e8fc910f854d (patch) | |
tree | 4e6b0ceec4a3a67533027e3e5b7d763c62193600 | |
parent | increment version (diff) | |
download | udev-gentoo-scripts-2af15ef2231161205a25723fefd9e8fc910f854d.tar.gz udev-gentoo-scripts-2af15ef2231161205a25723fefd9e8fc910f854d.tar.bz2 udev-gentoo-scripts-2af15ef2231161205a25723fefd9e8fc910f854d.zip |
Add code to stop udevd if udevadm control --exit fails21
Thanks to Nikoli for pointing this out.
-rw-r--r-- | init.d/udev | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/init.d/udev b/init.d/udev index bb97b7c..342b3af 100644 --- a/init.d/udev +++ b/init.d/udev @@ -196,9 +196,17 @@ start_post() stop() { + local rc=0 ebegin "Stopping ${name:-$RC_SVCNAME}" udevadm control --exit - eend $? "Failed to stop $RC_SVCNAME" + 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 --exec /sbin/udevd + rc=$? + fi + eend $rc "Failed to stop $RC_SVCNAME" } reload() |