diff options
author | 2012-07-12 14:57:25 -0500 | |
---|---|---|
committer | 2012-07-12 14:57:25 -0500 | |
commit | bc71a9b26f25bbbcac07d26b30b6306b7b1c7263 (patch) | |
tree | 8c425a0804885c5366fca9dfaf7281ac0e3c5705 | |
parent | release udev-init-scripts-12 (diff) | |
download | udev-gentoo-scripts-bc71a9b26f25bbbcac07d26b30b6306b7b1c7263.tar.gz udev-gentoo-scripts-bc71a9b26f25bbbcac07d26b30b6306b7b1c7263.tar.bz2 udev-gentoo-scripts-bc71a9b26f25bbbcac07d26b30b6306b7b1c7263.zip |
remove get_rundir function
In>=udev-186, /run is assumed to exist, and the udevadm info --run
option is no longer valid.
-rw-r--r-- | init.d/udev | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/init.d/udev b/init.d/udev index ba5b25f..a054800 100644 --- a/init.d/udev +++ b/init.d/udev @@ -67,16 +67,6 @@ check_kernel() return 0 } -_RC_GET_RUNDIR_CACHE= -get_rundir() -{ - if [ -z "$_RC_GET_RUNDIR_CACHE" ]; then - _RC_GET_RUNDIR_CACHE="$(udevadm info --run)" - fi - echo "$_RC_GET_RUNDIR_CACHE" - return 0 -} - is_service_enabled() { local svc="$1" @@ -92,7 +82,7 @@ start_pre() { if is_service_enabled network; then # disable network hotplugging - local f="$(get_rundir)/rules.d/90-network.rules" + local f="/run/udev/rules.d/90-network.rules" echo "# This file disables network hotplug events calling" >> "${f}" echo "# old-style openrc net scripts" >> "${f}" echo "# as we use /etc/init.d/network to set up our network" >> "${f}" @@ -111,7 +101,7 @@ start_pre() fi if yesno "${udev_debug}"; then - command_args="${command_args} --debug 2> $(get_rundir)/udev.log" + command_args="${command_args} --debug 2> /run/udevdebug.log" fi } @@ -119,8 +109,8 @@ start_udevmonitor() { yesno "${udev_monitor}" || return 0 - udevmonitor_log="$(get_rundir)/udevmonitor.log" - udevmonitor_pid="$(get_rundir)/udevmonitor.pid" + udevmonitor_log=/run/udevmonitor.log + udevmonitor_pid=/run/udevmonitor.pid einfo "udev: Running udevadm monitor ${udev_monitor_opts} to log all events" start-stop-daemon --start --stdout "${udevmonitor_log}" \ |