[Frugalware-git] frugalware-current: udev-118-1-i686
Miklos Vajna
vmiklos at frugalware.org
Wed Dec 19 14:15:53 CET 2007
Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=fbaf2e7aebd4064c50a7d69927747dd8f681f413
commit fbaf2e7aebd4064c50a7d69927747dd8f681f413
Author: Miklos Vajna <vmiklos at frugalware.org>
Date: Wed Dec 19 14:13:23 2007 +0100
udev-118-1-i686
- version bump
- updated rc.udev to use udevadm trigger/settle instead of the obsolete
udevstart (from crazy)
- removed the hotplug service, it's now part of rc.udev
- the /etc/sysconfig/blacklist file now has a new format, read modprobe.conf(5)
to see the new syntax. the old format is converted automatically
diff --git a/source/base/udev/FrugalBuild b/source/base/udev/FrugalBuild
index 2563216..2e3101c 100644
--- a/source/base/udev/FrugalBuild
+++ b/source/base/udev/FrugalBuild
@@ -2,7 +2,7 @@
# Maintainer: VMiklos <vmiklos at frugalware.org>
pkgname=udev
-pkgver=117
+pkgver=118
pkgrel=1
pkgdesc="A userspace implementation of devfs"
url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/"
@@ -16,9 +16,8 @@ conflicts=('devfsd' 'pcmcia-cs' 'hotplug')
replaces=('hotplug')
up2date="lynx -dump '$url?C=M;O=D'|grep 'udev-.*tar.bz2 '|sed -n 's/.*-\(.*\)\.t.*/\1/;1 p'"
source=($url/$pkgname-$pkgver.tar.gz rc.udev blacklist \
- rc.hotplug rc.hotplug-hu.po \
README.Frugalware)
-signatures=("${source[0]}.sign" '' '' '' '' '')
+signatures=("${source[0]}.sign" '' '' '')
# if you update this package, you MUST test it carefully,
# including the rules. run 'udevtest -h' for the later
@@ -31,7 +30,6 @@ build()
Fpatchall
make V=1 || return 1
Fmakeinstall EXTRAS="extras/ata_id extras/cdrom_id extras/path_id extras/edd_id extras/firmware extras/floppy extras/scsi_id extras/usb_id extras/volume_id extras/rule_generator"
- Fexerel /sbin/udevstart
Fmkdir /lib/udev/devices
# there is a newer version of this in the packages folder, don't
# overwrite it
@@ -44,8 +42,9 @@ build()
# all the other not needed we don't have these archs
Frm etc/udev/rules.d/40-{alsa,ppc,s390,ia64}.rules
Fexe /etc/rc.d/rc.udev
- Frcd2 hotplug
Ffile /etc/sysconfig/blacklist
+ Fmkdir /etc/modprobe.d
+ Fln /etc/sysconfig/blacklist /etc/modprobe.d/blacklist
Fdoc README.Frugalware
mknod -m 700 $Fdestdir/dev/console c 5 1
chgrp tty $Fdestdir/dev/console
diff --git a/source/base/udev/blacklist b/source/base/udev/blacklist
index f7660f6..11ecf22 100644
--- a/source/base/udev/blacklist
+++ b/source/base/udev/blacklist
@@ -4,8 +4,7 @@
# no matter which driver happens to get probed first. Sometimes user
# mode tools can also control driver binding.
#
-# Syntax: driver name alone (without any spaces) on a line. Other
-# lines are ignored.
+# Syntax: see modprobe.conf(5), basically:
#
-
-seclvl
+# blacklist foo
+# blacklist bar
diff --git a/source/base/udev/rc.hotplug b/source/base/udev/rc.hotplug
deleted file mode 100644
index ae781f9..0000000
--- a/source/base/udev/rc.hotplug
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-
-# (c) 2003-2006 Miklos Vajna <vmiklos at frugalware.org>
-# (c) 2005 Marcus Habermehl <bmh1980de at yahoo.de>
-# rc.hotplug for Frugalware
-# distributed under GPL License
-
-# chkconfig: 2345 06 99
-# description: Automatic hardware detection
-
-source /lib/initscripts/functions
-TEXTDOMAIN=hotplug
-TEXTDOMAINDIR=/lib/initscripts/messages
-
-actions=(start stop)
-
-rc_start()
-{
- msg $"Activating hardware detection"
- for i in `find /sys/devices/ -name modalias |grep pci`
- do
- modlist="$modlist $(modprobe --show-depends `cat $i` 2>/dev/null|sed 's|insmod [^ ]*/\([^ ]*\)\.ko|\1|g')"
- done
- if [ -e /etc/sysconfig/blacklist ]; then
- for i in `cat /etc/sysconfig/blacklist|sed 's/#.*$//'`;
- do
- blacklist="$blacklist s/$i//;"
- done
- modlist=`echo "$modlist"|sed "$blacklist"`
- fi
- echo "0" > /proc/sys/kernel/printk
- for i in `echo $modlist|sed 's/ /\n/g'|sort -u`
- do
- modprobe $i >/dev/null 2>&1
- done
- # closes #281
- sleep 1
- ok $?
-}
-
-rc_stop()
-{
- /bin/true
-}
-
-rc_exec $1
-
-# vim: ft=sh
diff --git a/source/base/udev/rc.hotplug-hu.po b/source/base/udev/rc.hotplug-hu.po
deleted file mode 100644
index b0f6bfe..0000000
--- a/source/base/udev/rc.hotplug-hu.po
+++ /dev/null
@@ -1,24 +0,0 @@
-# Hungarian translations for rc.hotplug package.
-# Copyright (C) 2006 THE rc.hotplug'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the rc.hotplug package.
-# <vmiklos at frugalware.org>, 2006.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: rc.hotplug\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-01-05 12:37+0100\n"
-"PO-Revision-Date: 2006-01-05 12:28+0100\n"
-"Last-Translator: <vmiklos at frugalware.org>\n"
-"Language-Team: Hungarian <translation-team-hu at lists.sourceforge.net>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-2\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#: rc.hotplug:25
-msgid "Activating hardware detection"
-msgstr "Az automatikus hardverfelismerés indítása"
-
-#~ msgid "Stopping hotpluggable subsystem"
-#~ msgstr "A hotplug alrendszer leállítása"
diff --git a/source/base/udev/rc.hotplug.pot b/source/base/udev/rc.hotplug.pot
deleted file mode 100644
index eb052c4..0000000
--- a/source/base/udev/rc.hotplug.pot
+++ /dev/null
@@ -1,21 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-01-05 12:37+0100\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
-"Language-Team: LANGUAGE <LL at li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: rc.hotplug:25
-msgid "Activating hardware detection"
-msgstr ""
diff --git a/source/base/udev/rc.udev b/source/base/udev/rc.udev
index 09b2ccf..36afc39 100644
--- a/source/base/udev/rc.udev
+++ b/source/base/udev/rc.udev
@@ -14,6 +14,8 @@
mount / -o rw,remount
mount none -t sysfs /sys
+export MODPROBE_OPTIONS="--use-backlist"
+
. /etc/udev/udev.conf
prog=udev
@@ -22,38 +24,6 @@ bin=/sbin/udev
udevd=/sbin/udevd
udev_root="/dev"
-run_udev () {
- # handle block devices and their partitions
- for i in ${sysfs_dir}/block/*; do
- # add each drive
- export DEVPATH=${i#${sysfs_dir}}
- #echo "$DEVPATH"
- $bin block
-
- # add each partition, on each device
- for j in $i/*; do
- if [ -f $j/dev ]; then
- export DEVPATH=${j#${sysfs_dir}}
- #echo "$DEVPATH"
- $bin block
- fi
- done
- done
- # all other device classes
- for i in ${sysfs_dir}/class/*; do
- for j in $i/*; do
- if [ -f $j/dev ]; then
- export DEVPATH=${j#${sysfs_dir}}
- CLASS=`echo ${i#${sysfs_dir}} | \
- cut --delimiter='/' --fields=3-`
- #echo "$DEVPATH"
- $bin $CLASS
- fi
- done
- done
- return 0
-}
-
make_extra_nodes () {
# there are a few things that sysfs does not export for us.
# these things go here (and remember to remove them in
@@ -70,6 +40,13 @@ make_extra_nodes () {
mkdir $udev_root/shm
}
+start()
+{
+ /sbin/udevadm trigger
+ # Wait for udev events
+ /sbin/udevadm settle
+}
+
# don't use udev if sysfs is not mounted.
if [ ! -d $sysfs_dir/block ]; then
exit 1
@@ -83,11 +60,6 @@ export ACTION=add
export UDEV_NO_SLEEP=1
#echo "Creating initial udev device nodes:"
-# You can use the shell scripts above by calling run_udev or execute udevstart
-# which does the same thing, but much faster by not using shell.
-# Only comment out one of the following lines.
-#run_udev
-/sbin/udevstart
#echo "making extra nodes"
make_extra_nodes
@@ -103,13 +75,18 @@ if ! [ `pidof -o %PPID /sbin/udevd` ]; then
/sbin/udevd --daemon
fi
+mkdir -p /dev/.udev/queue
+start
+
# Make udevsend the hotplug multiplexer
if [ -f "/sys/class/tty/console/uevent" ]; then
# trigger the sorted events
echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
-else
- echo "/sbin/udevsend" > /proc/sys/kernel/hotplug
-fi
+fi
+
+## just in case we have a box with a lot USB or external HW try detecting again
+start
+
mount / -o ro,remount
# end of rc.udev
diff --git a/source/base/udev/udev.install b/source/base/udev/udev.install
index 15f858a..422e11a 100644
--- a/source/base/udev/udev.install
+++ b/source/base/udev/udev.install
@@ -2,15 +2,18 @@ post_install()
{
cd /etc/rc.d/rcS.d
ln -sf ../rc.udev S00rc.udev
- chkconfig --add rc.hotplug
}
post_upgrade()
{
- # force once the usage of hotplug
- if [ `vercmp $2 079` -lt 0 ] ; then
- chkconfig --add rc.hotplug
+ # can be removed after Frugalware-0.7
+ # remove obsolete hotplug service
+ chkconfig --del rc.hotplug &>/dev/null
+ # convert the blaclist file to the new format
+ if ! greq -q blacklist /etc/sysconfig/blacklist; then
+ sed -i 's/^\(.\)/blacklist \1/' /etc/sysconfig/blacklist
fi
+
if [ -e /etc/sysconfig/udev ]; then
echo "warning: /etc/sysconfig/udev is now obsolete, please read"
echo "/usr/share/doc/udev-`echo $1|sed 's/\(.*\)-.*/\1/'`/README.Frugalware!"
@@ -41,7 +44,6 @@ post_upgrade()
pre_remove()
{
rm /etc/rc.d/rcS.d/S00rc.udev
- chkconfig --del rc.hotplug
}
op=$1
More information about the Frugalware-git
mailing list