From 81ca5fe7db1a42ffe8a53629aaae81087325a37a Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Mon, 4 Feb 2013 15:49:07 -0600 Subject: init.d/udev: remove kernel version checks Udev does not actively block people from attempting to run on older versions of the kernel, so we shouldn't either. X-Gentoo-Bug: 454324 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=454324 --- init.d/udev | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) diff --git a/init.d/udev b/init.d/udev index ea41fee..af0a40e 100644 --- a/init.d/udev +++ b/init.d/udev @@ -12,7 +12,6 @@ udev_debug="${udev_debug:-no}" udev_monitor="${udev_monitor:-no}" udev_monitor_keep_running="${udev_monitor_keep_running:-no}" udev_settle_timeout="${udev_settle_timeout:-60}" -kv_min="${kv_min:-2.6.39}" depend() { @@ -26,50 +25,6 @@ depend() keyword -vserver -lxc } -KV_to_int() -{ - [ -z $1 ] && return 1 - - local x=${1%%[!0-9.]*} y= z= - local KV_MAJOR=${x%%.*} - y=${x#*.} - [ "$x" = "$y" ] && y=0.0 - local KV_MINOR=${y%%.*} - z=${y#*.} - [ "$y" = "$z" ] && z=0 - local KV_MICRO=${z%%.*} - local KV_int=$((${KV_MAJOR} * 65536 + ${KV_MINOR} * 256 + ${KV_MICRO} )) - - # We make version 2.2.0 the minimum version we will handle as - # a sanity check ... if its less, we fail ... - [ "${KV_int}" -lt 131584 ] && return 1 - - echo "${KV_int}" -} - -_RC_GET_KV_CACHE="" -get_KV() -{ - if [ -z "${_RC_GET_KV_CACHE}" ] ; then - _RC_GET_KV_CACHE="$(uname -r)" - fi - echo "$(KV_to_int "${_RC_GET_KV_CACHE}")" - return $? -} - -# FIXME -# Instead of this script testing kernel version, udev itself should -# Maybe something like udevd --test || exit $? -check_kernel() -{ - if [ $(get_KV) -lt $(KV_to_int ${kv_min}) ]; then - eerror "Your kernel is too old to work with this version of udev." - eerror "Current udev only supports Linux kernel ${kv_min} and newer." - return 1 - fi - return 0 -} - disable_oldnet_hotplug() { if is_service_enabled network; then @@ -85,7 +40,6 @@ disable_oldnet_hotplug() start_pre() { - check_kernel || return 1 if [ -e /proc/sys/kernel/hotplug ]; then echo "" >/proc/sys/kernel/hotplug fi -- cgit v1.2.3