From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/
Date: Thu, 10 Sep 2015 16:00:09 +0000 (UTC) [thread overview]
Message-ID: <1441900675.ee95471d2c09f373b0b0683e40cd0e1f1a4904ac.williamh@gentoo> (raw)
commit: ee95471d2c09f373b0b0683e40cd0e1f1a4904ac
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 10 15:57:55 2015 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Sep 10 15:57:55 2015 +0000
URL: https://gitweb.gentoo.org/proj/udev-gentoo-scripts.git/commit/?id=ee95471d
udev: create a function to locate the binary
init.d/udev | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/init.d/udev b/init.d/udev
index f286ad8..8106a20 100644
--- a/init.d/udev
+++ b/init.d/udev
@@ -14,6 +14,19 @@ depend()
keyword -lxc -systemd-nspawn -vserver
}
+get_udevd_binary() {
+ bins="/sbin/udevd /lib/systemd/systemd-udevd /usr/lib/systemd/systemd-udevd"
+ for f in ${bins}; do
+ if [ -x "$f" -a ! -L "$f" ]; then
+ command="$f"
+ fi
+ done
+ if [ -z "$command" ]; then
+ eerror "Unable to find udev executable."
+ return 1
+ fi
+}
+
start_pre()
{
# make sure devtmpfs is in the kernel
@@ -45,16 +58,7 @@ start_pre()
fi
fi
- bins="/sbin/udevd /lib/systemd/systemd-udevd /usr/lib/systemd/systemd-udevd"
- for f in ${bins}; do
- if [ -x "$f" -a ! -L "$f" ]; then
- command="$f"
- fi
- done
- if [ -z "$command" ]; then
- eerror "Unable to find udev executable."
- return 1
- fi
+ get_udevd_binary || return 1
if [ -e /proc/sys/kernel/hotplug ]; then
echo "" >/proc/sys/kernel/hotplug
@@ -75,8 +79,9 @@ 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 /sbin/udevd
+ start-stop-daemon --stop --exec ${command}
rc=$?
fi
eend $rc "Failed to stop $RC_SVCNAME"
next reply other threads:[~2015-09-10 16:00 UTC|newest]
Thread overview: 89+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-10 16:00 William Hubbs [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-08-29 18:38 [gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/ William Hubbs
2021-05-24 22:55 William Hubbs
2021-05-22 18:49 William Hubbs
2020-08-05 16:13 William Hubbs
2020-08-05 16:13 William Hubbs
2019-11-30 21:26 William Hubbs
2019-11-30 20:08 William Hubbs
2019-02-20 17:13 William Hubbs
2016-11-10 17:20 William Hubbs
2016-11-10 16:39 William Hubbs
2016-11-09 20:33 William Hubbs
2016-06-01 21:25 William Hubbs
2016-05-31 21:19 William Hubbs
2016-05-26 15:56 William Hubbs
2015-09-10 16:03 William Hubbs
2015-09-10 16:00 William Hubbs
2015-06-17 21:42 William Hubbs
2015-06-14 15:43 William Hubbs
2015-06-10 21:18 William Hubbs
2015-06-01 15:33 William Hubbs
2015-06-01 15:33 William Hubbs
2015-05-02 19:50 William Hubbs
2015-04-30 2:07 William Hubbs
2015-04-30 2:04 William Hubbs
2014-12-04 0:53 William Hubbs
2014-11-03 20:38 William Hubbs
2014-08-10 19:42 William Hubbs
2014-08-19 0:08 ` William Hubbs
2014-03-07 17:43 Samuli Suominen
2013-04-15 15:54 William Hubbs
2013-04-03 15:39 William Hubbs
2013-03-21 16:06 William Hubbs
2013-03-21 15:59 William Hubbs
2013-03-19 17:24 William Hubbs
2013-03-19 16:38 William Hubbs
2013-02-27 21:23 William Hubbs
2013-02-04 21:59 William Hubbs
2013-01-27 19:38 William Hubbs
2013-01-27 18:56 William Hubbs
2013-01-27 18:56 William Hubbs
2013-01-21 19:29 William Hubbs
2013-01-21 16:45 William Hubbs
2013-01-08 21:58 William Hubbs
2013-01-08 20:01 William Hubbs
2013-01-04 23:21 William Hubbs
2013-01-04 21:55 William Hubbs
2013-01-04 21:52 William Hubbs
2013-01-04 21:28 William Hubbs
2012-11-24 4:44 William Hubbs
2012-09-26 21:41 Robin H. Johnson
2012-08-01 16:22 William Hubbs
2012-07-13 0:26 William Hubbs
2012-07-12 20:59 William Hubbs
2012-07-12 20:59 William Hubbs
2012-07-04 16:27 William Hubbs
2012-07-04 15:45 William Hubbs
2012-07-01 21:09 William Hubbs
2012-06-30 23:47 William Hubbs
2012-06-30 23:47 William Hubbs
2012-06-30 23:47 William Hubbs
2012-05-01 16:57 William Hubbs
2012-05-01 16:39 William Hubbs
2012-03-20 18:43 William Hubbs
2012-02-24 21:43 Matthias Schwarzott
2012-02-20 22:10 William Hubbs
2012-02-14 19:07 William Hubbs
2012-02-14 17:30 William Hubbs
2012-01-08 20:15 William Hubbs
2012-01-03 17:43 William Hubbs
2012-01-03 16:26 William Hubbs
2012-01-02 0:01 William Hubbs
2011-12-22 15:47 William Hubbs
2011-12-21 19:51 William Hubbs
2011-12-09 4:42 William Hubbs
2011-12-09 3:45 William Hubbs
2011-09-14 18:03 William Hubbs
2011-09-14 17:09 William Hubbs
2011-09-05 19:58 William Hubbs
2011-09-05 19:01 William Hubbs
2011-09-04 3:23 William Hubbs
2011-09-01 19:49 William Hubbs
2011-08-17 20:26 William Hubbs
2011-08-17 16:55 William Hubbs
2011-08-03 21:22 William Hubbs
2011-07-31 20:41 William Hubbs
2011-07-15 19:18 William Hubbs
2011-07-15 18:02 William Hubbs
2011-07-15 16:30 William Hubbs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1441900675.ee95471d2c09f373b0b0683e40cd0e1f1a4904ac.williamh@gentoo \
--to=williamh@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox