From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.77) (envelope-from ) id 1Sl7O0-0005fZ-7v for garchives@archives.gentoo.org; Sat, 30 Jun 2012 23:47:32 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 505CFE06C8; Sat, 30 Jun 2012 23:47:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 0EC4AE06C8 for ; Sat, 30 Jun 2012 23:47:14 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4A9CE1B401C for ; Sat, 30 Jun 2012 23:47:14 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 09A7EE543C for ; Sat, 30 Jun 2012 23:47:13 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1341098919.7084a91b1ec84af5173597b41b3ed899996bf9c8.WilliamH@gentoo> Subject: [gentoo-commits] proj/udev-gentoo-scripts:master commit in: init.d/, conf.d/ X-VCS-Repository: proj/udev-gentoo-scripts X-VCS-Files: conf.d/udev init.d/udev X-VCS-Directories: init.d/ conf.d/ X-VCS-Committer: WilliamH X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 7084a91b1ec84af5173597b41b3ed899996bf9c8 X-VCS-Branch: master Date: Sat, 30 Jun 2012 23:47:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 17581003-87ca-4034-9d7a-fe4f64548d26 X-Archives-Hash: 010cc3ee898db9349dcf6ed43670f477 commit: 7084a91b1ec84af5173597b41b3ed899996bf9c8 Author: William Hubbs gentoo org> AuthorDate: Sat Jun 30 23:06:33 2012 +0000 Commit: William Hubbs gentoo org> CommitDate: Sat Jun 30 23:28:39 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/udev-gentoo-s= cripts.git;a=3Dcommit;h=3D7084a91b 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. --- conf.d/udev | 11 ---------- init.d/udev | 61 -----------------------------------------------------= ------ 2 files changed, 0 insertions(+), 72 deletions(-) diff --git a/conf.d/udev b/conf.d/udev index 12c2afa..3c425b3 100644 --- a/conf.d/udev +++ b/conf.d/udev @@ -1,16 +1,5 @@ # /etc/conf.d/udev: config file for udev =20 -# We discourage to disable persistent-net!! -# this may lead to random interface naming - -# Disable adding new rules for persistent-net -persistent_net_disable=3D"no" - -# Disable adding new rules for persistent-cd -# Disabling this will stop new cdrom devices to appear -# as /dev/{cdrom,cdrw,dvd,dvdrw} -persistent_cd_disable=3D"no" - # udev can trigger coldplug events which cause services to start and # kernel modules to be loaded. # Services are deferred to start in the boot runlevel. 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=3D/usr/lib/systemd/systemd-udevd command_args=3D"--daemon ${udev_opts}" description=3D"udev manages device permissions and symbolic links in /de= v" =20 -persistent_cd_disable=3D"${persistent_cd_disable:-no}" -persistent_net_disable=3D"${persistent_net_disable:-no}" rc_coldplug=3D${rc_coldplug:-${RC_COLDPLUG:-YES}} udev_debug=3D"${udev_debug:-no}" udev_monitor=3D"${udev_monitor:-no}" @@ -81,21 +79,6 @@ cleanup() exit 1 } =20 -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=3D$(get_rundir)/rules.d/"$1" bname=3D"$1" onoff=3D"$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=3D"$1" @@ -127,9 +110,6 @@ start_pre() =20 /lib/udev/write_root_link_rule =20 - rules_disable_switch 75-persistent-net-generator.rules "${persistent_ne= t_disable}" - rules_disable_switch 75-cd-aliases-generator.rules ${persistent_cd_disa= ble} -=09 if [ -e /proc/sys/kernel/hotplug ]; then echo "" >/proc/sys/kernel/hotplug fi @@ -189,46 +169,6 @@ populate_dev() return 0 } =20 -check_persistent_net() -{ - # check if there are problems with persistent-net - local syspath=3D devs=3D problem=3Dfalse - for syspath in /sys/class/net/*_rename*; do - if [ -d "${syspath}" ]; then - devs=3D"${devs} ${syspath##*/}" - problem=3Dtrue - 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=3D$( - RULES_FILE=3D'/etc/udev/rules.d/70-persistent-net.rules' - . /lib/udev/rule_generator.functions - find_all_rules 'NAME=3D' '.*' | \ - 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