diff options
author | William Hubbs <williamh@gentoo.org> | 2013-01-04 15:49:22 -0600 |
---|---|---|
committer | William Hubbs <williamh@gentoo.org> | 2013-01-04 15:49:22 -0600 |
commit | a174eb4ed5e9845c5631cadd739297aaaa21eb15 (patch) | |
tree | dd85004a5eefbd05dffd7cb4779a6d35b778e35f | |
parent | udev: add a stop function (diff) | |
download | udev-gentoo-scripts-a174eb4ed5e9845c5631cadd739297aaaa21eb15.tar.gz udev-gentoo-scripts-a174eb4ed5e9845c5631cadd739297aaaa21eb15.tar.bz2 udev-gentoo-scripts-a174eb4ed5e9845c5631cadd739297aaaa21eb15.zip |
udev: move the code to search for the binary to start_pre
This does not need to be in global scope since the only place the
command variable is used is the start function.
-rw-r--r-- | init.d/udev | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/init.d/udev b/init.d/udev index d61f1e2..c25e586 100644 --- a/init.d/udev +++ b/init.d/udev @@ -2,12 +2,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -if [ -x /sbin/udevd ]; then - command=/sbin/udevd -else - command=/usr/lib/systemd/systemd-udevd -fi - command_args="--daemon ${udev_opts}" description="udev manages device permissions and symbolic links in /dev" extra_started_commands="reload" @@ -94,6 +88,13 @@ start_pre() if yesno "${udev_debug}"; then command_args="${command_args} --debug 2> /run/udevdebug.log" fi + + if [ -x /sbin/udevd ]; then + command=/sbin/udevd + else + command=/usr/lib/systemd/systemd-udevd + fi + return 0 } is_service_enabled() |