From 7084a91b1ec84af5173597b41b3ed899996bf9c8 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Sat, 30 Jun 2012 18:06:33 -0500 Subject: drop support for the persistent rules generators For udev 185 and newer, this is not supported by upstream, so we can remove the code from the startup script. --- init.d/udev | 61 ------------------------------------------------------------- 1 file changed, 61 deletions(-) (limited to 'init.d') diff --git a/init.d/udev b/init.d/udev index 265523a..2adee63 100644 --- a/init.d/udev +++ b/init.d/udev @@ -6,8 +6,6 @@ command=/usr/lib/systemd/systemd-udevd command_args="--daemon ${udev_opts}" description="udev manages device permissions and symbolic links in /dev" -persistent_cd_disable="${persistent_cd_disable:-no}" -persistent_net_disable="${persistent_net_disable:-no}" rc_coldplug=${rc_coldplug:-${RC_COLDPLUG:-YES}} udev_debug="${udev_debug:-no}" udev_monitor="${udev_monitor:-no}" @@ -81,21 +79,6 @@ cleanup() exit 1 } -rules_disable_switch() -{ - # this function disables rules files - # by creating new files with the same name - # in a temp rules directory with higher priority - local f=$(get_rundir)/rules.d/"$1" bname="$1" onoff="$2" - - if yesno "${onoff}"; then - echo "# This file disables ${bname} due to /etc/conf.d/udev" \ - > "${f}" - else - rm -f "${f}" - fi -} - is_service_enabled() { local svc="$1" @@ -127,9 +110,6 @@ start_pre() /lib/udev/write_root_link_rule - rules_disable_switch 75-persistent-net-generator.rules "${persistent_net_disable}" - rules_disable_switch 75-cd-aliases-generator.rules ${persistent_cd_disable} - if [ -e /proc/sys/kernel/hotplug ]; then echo "" >/proc/sys/kernel/hotplug fi @@ -189,46 +169,6 @@ populate_dev() return 0 } -check_persistent_net() -{ - # check if there are problems with persistent-net - local syspath= devs= problem=false - for syspath in /sys/class/net/*_rename*; do - if [ -d "${syspath}" ]; then - devs="${devs} ${syspath##*/}" - problem=true - fi - done - - ${problem} || return 0 - - eerror "UDEV: Your system has a problem assigning persistent names" - eerror "to these network interfaces: ${devs}" - - einfo "Checking persistent-net rules:" - # the sed-expression lists all duplicate lines - # from the input, like "uniq -d" does, but uniq - # is installed into /usr/bin and not available at boot. - dups=$( - RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules' - . /lib/udev/rule_generator.functions - find_all_rules 'NAME=' '.*' | \ - tr ' ' '\n' | \ - sort | \ - sed '$!N; s/^\(.*\)\n\1$/\1/; t; D' - ) - if [ -n "${dups}" ]; then - ewarn "The rules create multiple entries assigning these names:" - eindent - ewarn "${dups}" - eoutdent - else - ewarn "Found no duplicate names in persistent-net rules," - ewarn "there must be some other problem!" - fi - return 1 -} - check_udev_works() { # should exist on every system, else udev failed @@ -267,7 +207,6 @@ start_post() { start_udevmonitor populate_dev - check_persistent_net check_udev_works || cleanup stop_udevmonitor display_hotplugged_services -- cgit v1.2.3-65-gdbad