moved udev-related ports into core

This commit is contained in:
Simone Rota 2006-02-23 17:19:35 +00:00
parent b564fd74e3
commit 8dcff5b397
26 changed files with 0 additions and 1162 deletions

View File

@ -1,38 +0,0 @@
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/hotplug.d/
drwxr-xr-x root/root etc/hotplug.d/default/
-rwxr-xr-x root/root etc/hotplug.d/default/default.hotplug
drwxr-xr-x root/root etc/hotplug/
-rw-r--r-- root/root etc/hotplug/blacklist
-rwxr-xr-x root/root etc/hotplug/dasd.agent
-rwxr-xr-x root/root etc/hotplug/firmware.agent
-rwxr-xr-x root/root etc/hotplug/hotplug.functions
-rwxr-xr-x root/root etc/hotplug/ieee1394.agent
-rwxr-xr-x root/root etc/hotplug/input.agent
-rwxr-xr-x root/root etc/hotplug/input.rc
-rwxr-xr-x root/root etc/hotplug/net.agent
-rwxr-xr-x root/root etc/hotplug/pci.agent
-rwxr-xr-x root/root etc/hotplug/pci.rc
drwxr-xr-x root/root etc/hotplug/pci/
-rwxr-xr-x root/root etc/hotplug/pnp.rc
-rwxr-xr-x root/root etc/hotplug/scsi.agent
-rwxr-xr-x root/root etc/hotplug/tape.agent
-rwxr-xr-x root/root etc/hotplug/usb.agent
-rw-r--r-- root/root etc/hotplug/usb.distmap
-rw-r--r-- root/root etc/hotplug/usb.handmap
-rwxr-xr-x root/root etc/hotplug/usb.rc
-rw-r--r-- root/root etc/hotplug/usb.usermap
drwxr-xr-x root/root etc/hotplug/usb/
drwxr-xr-x root/root lib/
drwxr-xr-x root/root lib/firmware/
drwxr-xr-x root/root sbin/
-rwxr-xr-x root/root sbin/hotplug
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/man/
drwxr-xr-x root/root usr/man/man8/
-rwxr-xr-x root/root usr/man/man8/hotplug.8.gz
drwxr-xr-x root/root var/
drwxr-xr-x root/root var/log/
drwxr-xr-x root/root var/log/hotplug/
drwxr-xr-x root/root var/run/
drwx------ root/root var/run/usb/

View File

@ -1,2 +0,0 @@
1a53a557d195de40ae8174b847286bd6 hotplug-2004_09_23-default.patch
58e6995f9df71ce59b0ec2787019e5fe hotplug-2004_09_23.tar.bz2

View File

@ -1,31 +0,0 @@
# Description: Linux USB/PCI Hotplug scripts
# URL: http://linux-hotplug.sourceforge.net/
# Maintainer: Matt Housh <jaeger at morpheus dot net>
# Depends on: pciutils, usbutils
name=hotplug
version=2004_09_23
release=7
source=(ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/$name-$version.tar.bz2 \
$name-$version-default.patch)
build() {
cd $name-$version
patch -p0 etc/hotplug.d/default/default.hotplug \
< $SRC/$name-$version-default.patch
install -D sbin/hotplug $PKG/sbin/hotplug
mkdir -p $PKG/etc/hotplug/{pci,usb} $PKG/lib/firmware
install -D etc/hotplug.d/default/default.hotplug \
$PKG/etc/hotplug.d/default/default.hotplug
for i in etc/hotplug/{*.{agent,rc},hotplug.functions}
do
install $i $PKG/etc/hotplug/
done
for i in etc/hotplug/{blacklist,usb.{user,hand,dist}map}
do
install -m 0644 $i $PKG/etc/hotplug/
done
install -D $name.8 $PKG/usr/man/man8/$name.8
mkdir -p $PKG/var/log/hotplug $PKG/var/run
install -d -m 0700 $PKG/var/run/usb
}

View File

@ -1,9 +0,0 @@
README for hotplug
If you need coldplugging support (modules loaded for devices that were present
at boot-time that would normally be hotplugged), install coldplug and add
"coldplug" to the SERVICES array in /etc/rc.conf. This port no longer has
an init script so it's safe to remove "hotplug" from SERVICES.

View File

@ -1,14 +0,0 @@
diff -urN hotplug-2004_09_23.orig/etc/hotplug.d/default/default.hotplug hotplug-2004_09_23/etc/hotplug.d/default/default.hotplug
--- hotplug-2004_09_23.orig/etc/hotplug.d/default/default.hotplug 2004-09-20 16:40:27.000000000 -0500
+++ hotplug-2004_09_23/etc/hotplug.d/default/default.hotplug 2005-08-19 15:47:47.172431432 -0500
@@ -23,6 +23,10 @@
# $Id: default.hotplug,v 1.4 2004/09/20 21:40:27 kroah Exp $
#
+if [ ! -e /dev/null ]
+then
+ /bin/mknod -m 0666 /dev/null c 1 3
+fi
exec < /dev/null
test -t 1 || exec > /dev/null
test -t 2 || exec 2>&1

View File

@ -1,24 +0,0 @@
drwxr-xr-x root/root lib/
lrwxrwxrwx root/root lib/libusb-0.1.so.4 -> libusb-0.1.so.4.4.3
-rwxr-xr-x root/root lib/libusb-0.1.so.4.4.3
lrwxrwxrwx root/root lib/libusbpp-0.1.so.4 -> libusbpp-0.1.so.4.4.3
-rwxr-xr-x root/root lib/libusbpp-0.1.so.4.4.3
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/libusb-config
drwxr-xr-x root/root usr/include/
-rw-r--r-- root/root usr/include/usb.h
-rw-r--r-- root/root usr/include/usbpp.h
drwxr-xr-x root/root usr/lib/
lrwxrwxrwx root/root usr/lib/libusb-0.1.so.4 -> libusb-0.1.so.4.4.3
lrwxrwxrwx root/root usr/lib/libusb-0.1.so.4.4.3 -> ../../lib/libusb-0.1.so.4.4.3
-rw-r--r-- root/root usr/lib/libusb.a
-rwxr-xr-x root/root usr/lib/libusb.la
lrwxrwxrwx root/root usr/lib/libusb.so -> libusb-0.1.so.4.4.3
lrwxrwxrwx root/root usr/lib/libusbpp-0.1.so.4 -> libusbpp-0.1.so.4.4.3
lrwxrwxrwx root/root usr/lib/libusbpp-0.1.so.4.4.3 -> ../../lib/libusbpp-0.1.so.4.4.3
-rw-r--r-- root/root usr/lib/libusbpp.a
-rwxr-xr-x root/root usr/lib/libusbpp.la
lrwxrwxrwx root/root usr/lib/libusbpp.so -> libusbpp-0.1.so.4.4.3
drwxr-xr-x root/root usr/lib/pkgconfig/
-rw-r--r-- root/root usr/lib/pkgconfig/libusb.pc

View File

@ -1 +0,0 @@
df79951a36333104a663c30cb598df37 libusb-0.1.11.tar.gz

View File

@ -1,26 +0,0 @@
# Description: Library giving userland programs access to USB devices
# URL: http://libusb.sourceforge.net/
# Maintainer: Jürgen Daubert, juergen dot daubert at t-online dot de
name=libusb
version=0.1.11
release=1
source=(http://dl.sourceforge.net/sourceforge/$name/$name-$version.tar.gz)
build () {
cd $name-$version
./configure --prefix=/usr \
--disable-nls \
--without-qt \
--disable-build-docs
make
make DESTDIR=$PKG install
mkdir $PKG/lib
local file libfiles=$PKG/usr/lib/lib*-*.so.*.*.*
for file in $libfiles; do
mv $file $PKG/lib/
ln -sf ../../lib/${file##*/} $PKG/usr/lib/${file##*/}
done
/sbin/ldconfig -nN $PKG/lib
}

View File

@ -1,23 +0,0 @@
README for libusb 0.1.x
REQUIREMENTS
1. Kernel support for USB device filesystem
2. Mount the usbfs. This can be done with an entry in /etc/fstab:
none /proc/bus/usb usbfs defaults 0 0
PRE-INSTALL
POST-INSTALL
1. To give other users than root access to the usb devices, either
install hotplug or create a executable file /sbin/hotplug with
the following content:
#!/bin/sh
if [ "$ACTION" = "add" ]; then
sleep 1
chown root:users "$DEVICE"
chmod 0660 "$DEVICE"
fi
# End of file
PRECAUTION

View File

@ -1,24 +0,0 @@
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/include/
drwxr-xr-x root/root usr/include/pci/
-rw-r--r-- root/root usr/include/pci/config.h
-rw-r--r-- root/root usr/include/pci/header.h
-rw-r--r-- root/root usr/include/pci/i386-io-linux.h
-rw-r--r-- root/root usr/include/pci/internal.h
-rw-r--r-- root/root usr/include/pci/pci.h
-rw-r--r-- root/root usr/include/pci/pread.h
-rw-r--r-- root/root usr/include/pci/sysdep.h
-rw-r--r-- root/root usr/include/pci/types.h
drwxr-xr-x root/root usr/lib/
-rw-r--r-- root/root usr/lib/libpci.a
drwxr-xr-x root/root usr/man/
drwxr-xr-x root/root usr/man/man8/
-rw-r--r-- root/root usr/man/man8/lspci.8.gz
-rw-r--r-- root/root usr/man/man8/setpci.8.gz
-rw-r--r-- root/root usr/man/man8/update-pciids.8.gz
drwxr-xr-x root/root usr/sbin/
-rwxr-xr-x root/root usr/sbin/lspci
-rwxr-xr-x root/root usr/sbin/setpci
-rwxr-xr-x root/root usr/sbin/update-pciids
drwxr-xr-x root/root usr/share/
-rw-r--r-- root/root usr/share/pci.ids

View File

@ -1,2 +0,0 @@
bd3ee86784408c289faea8a00d694e0c pci.ids-060221.gz
c18e2a5f04e9abae5a42439de294f086 pciutils-2.2.1.tar.gz

View File

@ -1,25 +0,0 @@
# Description: Linux PCI Utilities
# URL: http://atrey.karlin.mff.cuni.cz/~mj/pciutils.shtml
# Packager: Markus Ackermann, maol at symlink dot ch
# Maintainer: Jürgen Daubert, juergen dot daubert at t-online dot de
name=pciutils
version=2.2.1
release=2
source=(ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/$name-$version.tar.gz \
http://jue.li/crux/files/pci.ids-060221.gz)
build() {
cd $name-$version
mkdir -p $PKG/usr/{lib,share,include/pci}
gunzip -c $SRC/pci.ids-060221.gz > $PKG/usr/share/pci.ids
sed -i "s/-O2/$CFLAGS/" Makefile
make PREFIX=/usr
make PREFIX=$PKG/usr install
cd lib
./configure
make
cp libpci.a $PKG/usr/lib
cp *.h $PKG/usr/include/pci
rm $PKG/usr/include/pci/i386-io-{h*,s*,w*}
}

View File

@ -1,20 +0,0 @@
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/get_device
-rwxr-xr-x root/root usr/bin/get_driver
-rwxr-xr-x root/root usr/bin/get_module
-rwxr-xr-x root/root usr/bin/systool
-rwxr-xr-x root/root usr/bin/testlibsysfs
drwxr-xr-x root/root usr/include/
drwxr-xr-x root/root usr/include/sysfs/
-rw-r--r-- root/root usr/include/sysfs/dlist.h
-rw-r--r-- root/root usr/include/sysfs/libsysfs.h
drwxr-xr-x root/root usr/lib/
-rw-r--r-- root/root usr/lib/libsysfs.a
-rwxr-xr-x root/root usr/lib/libsysfs.la
lrwxrwxrwx root/root usr/lib/libsysfs.so -> libsysfs.so.2.0.0
lrwxrwxrwx root/root usr/lib/libsysfs.so.2 -> libsysfs.so.2.0.0
-rwxr-xr-x root/root usr/lib/libsysfs.so.2.0.0
drwxr-xr-x root/root usr/man/
drwxr-xr-x root/root usr/man/man1/
-rw-r--r-- root/root usr/man/man1/systool.1.gz

View File

@ -1 +0,0 @@
b7857c045ef3b4810c9b8be965c05fb9 sysfsutils-2.0.0.tar.gz

View File

@ -1,17 +0,0 @@
# Description: System Utilities Based on Sysfs
# URL: http://linux-diag.sourceforge.net/Sysfsutils.html
# Maintainer: Jukka Heino, jukka at karsikkopuu dot net
# Packager: Daniel Mueller, daniel at danm dot de
name=sysfsutils
version=2.0.0
release=1
source=(http://dl.sourceforge.net/sourceforge/linux-diag/$name-$version.tar.gz)
build() {
cd $name-$version
./configure --prefix=/usr
make
make DESTDIR=$PKG install
rm -f $PKG/usr/bin/dlist_test
}

View File

@ -1,61 +0,0 @@
drwxr-xr-x root/root dev/
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/dev.d/
drwxr-xr-x root/root etc/dev.d/default/
drwxr-xr-x root/root etc/dev.d/net/
-rwxr-xr-x root/root etc/dev.d/net/hotplug.dev
drwxr-xr-x root/root etc/hotplug.d/
drwxr-xr-x root/root etc/hotplug.d/default/
lrwxrwxrwx root/root etc/hotplug.d/default/10-udev.hotplug -> /sbin/udevsend
-rw-r--r-- root/root etc/scsi_id.config
drwxr-xr-x root/root etc/udev/
drwxr-xr-x root/root etc/udev/rules.d/
-rw-r--r-- root/root etc/udev/rules.d/50-udev.rules
-rw-r--r-- root/root etc/udev/udev.conf
drwxr-xr-x root/root lib/
drwxr-xr-x root/root lib/udev/
-rwxr-xr-x root/root lib/udev/create_floppy_devices
drwxr-xr-x root/root lib/udev/devices/
crw------- root/root lib/udev/devices/console (5, 1)
crw-rw-rw- root/root lib/udev/devices/null (1, 3)
crw-rw-rw- root/root lib/udev/devices/zero (1, 5)
-rwxr-xr-x root/root lib/udev/firmware_helper
-rwxr-xr-x root/root lib/udev/raid-devfs.sh
-rwxr-xr-x root/root lib/udev/udev_run_devd
-rwxr-xr-x root/root lib/udev/udev_run_hotplugd
drwxr-xr-x root/root sbin/
-rwxr-xr-x root/root sbin/ata_id
-rwxr-xr-x root/root sbin/cdrom_id
-rwxr-xr-x root/root sbin/create_floppy_devices
-rwxr-xr-x root/root sbin/firmware_helper
-rwxr-xr-x root/root sbin/path_id
-rwxr-xr-x root/root sbin/scsi_id
-rwxr-xr-x root/root sbin/start_udev
-rwxr-xr-x root/root sbin/udev
-rwxr-xr-x root/root sbin/udevcontrol
-rwxr-xr-x root/root sbin/udevd
-rwxr-xr-x root/root sbin/udevsend
-rwxr-xr-x root/root sbin/udevstart
-rwxr-xr-x root/root sbin/usb_id
-rwxr-xr-x root/root sbin/vol_id
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/udevinfo
-rwxr-xr-x root/root usr/bin/udevtest
drwxr-xr-x root/root usr/man/
drwxr-xr-x root/root usr/man/man7/
-rw-r--r-- root/root usr/man/man7/udev.7.gz
drwxr-xr-x root/root usr/man/man8/
-rw-r--r-- root/root usr/man/man8/ata_id.8.gz
-rw-r--r-- root/root usr/man/man8/cdrom_id.8.gz
-rw-r--r-- root/root usr/man/man8/scsi_id.8.gz
lrwxrwxrwx root/root usr/man/man8/udevcontrol.8.gz -> udevd.8.gz
-rw-r--r-- root/root usr/man/man8/udevd.8.gz
-rw-r--r-- root/root usr/man/man8/udevinfo.8.gz
-rw-r--r-- root/root usr/man/man8/udevmonitor.8.gz
-rw-r--r-- root/root usr/man/man8/udevsend.8.gz
-rw-r--r-- root/root usr/man/man8/udevstart.8.gz
-rw-r--r-- root/root usr/man/man8/udevtest.8.gz
-rw-r--r-- root/root usr/man/man8/vol_id.8.gz
drwxr-xr-x root/root usr/sbin/
-rwxr-xr-x root/root usr/sbin/udevmonitor

View File

@ -1,3 +0,0 @@
a7d745a3f3b8e222b6957aefec1cdd2f start_udev
14d5b6525cd97e5c602451965284e97a udev-085.tar.bz2
40c08f72053eae0035f9c3da9418fc18 udev.rules

View File

@ -1,41 +0,0 @@
# Description: Userspace device management daemon
# URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
# Maintainer: Matt Housh, jaeger at morpheus dot net
# Depends on: hotplug
name=udev
version=085
release=1
source=(ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/$name-$version.tar.bz2 \
udev.rules start_udev)
build() {
cd $name-$version
sed -i -e 's/$(OPTIMIZATION)//' Makefile
make \
USE_KLIBC=false \
USE_LOG=false \
DEBUG=false \
EXTRAS="extras/scsi_id extras/volume_id extras/ata_id extras/run_directory extras/usb_id extras/floppy extras/cdrom_id extras/firmware" \
udevdir="/dev" \
mandir="/usr/man" \
DESTDIR=$PKG all install
# udev, udevsend, udevstart need to be installed manually now
install -m 0755 udev{,send,start} $PKG/sbin/
# man pages
install -m 0644 udev{send,start}.8 $PKG/usr/man/man8/
install -m 0644 $SRC/udev.rules \
$PKG/etc/udev/rules.d/50-udev.rules
install extras/raid-devfs.sh $PKG/lib/udev/
install -D -m 0755 $SRC/start_udev $PKG/sbin/start_udev
install extras/path_id extras/floppy/create_floppy_devices \
extras/firmware/firmware_helper $PKG/sbin/
mkdir -p $PKG/etc/hotplug.d/default
ln -s /sbin/udevsend $PKG/etc/hotplug.d/default/10-udev.hotplug
mkdir -p $PKG/etc/dev.d/{default,net}
install extras/run_directory/dev.d/net/hotplug.dev $PKG/etc/dev.d/net/
mkdir -p $PKG/lib/udev/devices
mknod -m 0666 $PKG/lib/udev/devices/null c 1 3
mknod -m 0666 $PKG/lib/udev/devices/zero c 1 5
mknod -m 0600 $PKG/lib/udev/devices/console c 5 1
}

View File

@ -1,51 +0,0 @@
README for udev
The information formerly in this README is now available in the
devfs_to_udev_README file located in this directory.
This version of the udev port uses a modified gentoo start_udev
script and a slightly modified gentoo udev.rules file. The reason
for this is simply that I wish to spend less time maintaining
them and the gentoo people are doing a great job there. The
previous crux rules file is available in this directory as
crux-udev.rules but isn't installed with the port.
------------------------------------------------------------------
*IMPORTANT* - I don't intend to support the devfs-style names
forever. I've already removed the ide-devfs and scsi-devfs scripts
from the udev port. You'll need to edit your fstab and such to
reflect this if you use the devfs-style names. Eventally this
will also affect logins as /etc/inittab and /etc/securetty use
devfs-style vc/* notation, which needs to be changed to tty*. This
release contains legacy vc/* symlinks but this will change in the
future.
------------------------------------------------------------------
As a side note, I recommend a slightly different /etc/rc setup
than the original README. The appropriate sections look like this:
--------------------------------
# Start udev
/bin/mount -n -t proc none /proc
/bin/mount -n -t sysfs none /sys
/sbin/start_udev
--------------------------------
--------------------------------
# Mount local filesystems
/bin/mount -n -o remount,rw /
/bin/umount /sys /proc
/bin/rm -f /etc/mtab*
/bin/mount -a -O no_netdev
--------------------------------
This depends on your system having lines for /sys and /proc in
the fstab file, unlike the original README, but it cleans up
mount/mtab info. For reference, I use the following lines in
/etc/fstab:
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0

View File

@ -1,157 +0,0 @@
# /etc/udev/rules/50-udev.rules - crux udev device naming rules
# block devices get assigned to the "disk" group
SUBSYSTEM=="block", GROUP="disk"
# useful cdrom symlinks
BUS=="ide", KERNEL=="hd[a-z]", ACTION=="add", IMPORT="/sbin/cdrom_id --export $tempnode"
BUS=="scsi", KERNEL=="sr[0-9]*", ACTION=="add", IMPORT="/sbin/cdrom_id --export $tempnode"
BUS=="scsi", KERNEL=="scd[0-9]", ACTION=="add", IMPORT="/sbin/cdrom_id --export $tempnode"
ENV{ID_CDROM}=="?*", SYMLINK+="cdrom%e"
ENV{ID_CDROM_CD_RW}=="?*", SYMLINK+="cdrw%e"
ENV{ID_CDROM_DVD}=="?*", SYMLINK+="dvd%e"
ENV{ID_CDROM_DVD_R}=="?*", SYMLINK+=dvdrw%e"
# devfs-style symlinks as well (ide-devfs.sh returns 3 items, we only want the first 2)
BUS=="ide", KERNEL=="hd*", PROGRAM="/etc/udev/scripts/ide-devfs.sh %k %b %n", NAME="%k", SYMLINK+="%c{1} %c{2}"
# scsi-devfs.sh returns 5, we care about 3 and 5
BUS=="scsi", KERNEL=="sd*", PROGRAM="/etc/udev/scripts/scsi-devfs.sh sd %b %n", NAME="%k", SYMLINK+="%c{3} %c{5}"
# persistent device links in /dev/disk
KERNEL=="hd*[!0-9]", IMPORT="/sbin/ata_id --export $tempnode"
KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="dist/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}"
KERNEL=="hd*[0-9]", IMPORT{parent}=="ID_*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"
KERNEL=="sd*[!0-9]", SYSFS{ieee1394_id}=="*", IMPORT="/bin/echo -e 'ID_SERIAL=$sysfs{ieee1394_id}\nID_BUS=ieee1394'"
KERNEL=="sd*[!0-9]", ENV{ID_SERIAL}=="", IMPORT="/sbin/usb_id -x"
KERNEL=="sd*[!0-9]", ENV{ID_SERIAL}=="", IMPORT="/sbin/scsi_id -g -x -s %p -d %N"
KERNEL=="sd*[!0-9]", ENV{ID_SERIAL}=="", IMPORT="/sbin/scsi_id -g -x -a -s %p -d %N"
KERNEL=="sd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
KERNEL=="sd*[0-9]", IMPORT{parent}=="ID_*"
KERNEL=="sd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
# floppy devices
KERNEL=="fd[0-9]*", NAME="floppy/%n", SYMLINK="%k"
# loop devices
KERNEL=="loop[0-9]*", NAME="loop/%n", SYMLINK="%k"
# md devices
KERNEL=="md[0-9]*", NAME="md/%n", SYMLINK="%k"
# DRI devices (LSB spec)
KERNEL=="card*", NAME="dri/card%n", GROUP="video", MODE="0666"
# nvidia/3dfx video devices
KERNEL=="nvidia*", NAME="%k", GROUP="video"
KERNEL=="3dfx*", NAME="%k", GROUP="video"
# sound devices get assigned to the "audio" group
SUBSYSTEM=="sound", GROUP="audio"
# ALSA sound devices
KERNEL=="controlC[0-9]*", NAME="snd/%k"
KERNEL=="hw[CD0-9]*", NAME="snd/%k"
KERNEL=="pcm[CD0-9cp]*", NAME="snd/%k"
KERNEL=="midiC[D0-9]*", NAME="snd/%k"
KERNEL=="timer", NAME="snd/%k"
KERNEL=="seq", NAME="snd/%k"
# OSS sound devices
KERNEL=="adsp", NAME="sound/%k", SYMLINK="%k"
KERNEL=="adsp[0-9]*", NAME="sound/%k", SYMLINK="%k"
KERNEL=="audio", NAME="sound/%k", SYMLINK="%k"
KERNEL=="audio[0-9]*", NAME="sound/%k", SYMLINK="%k"
KERNEL=="dsp", NAME="sound/%k", SYMLINK="%k"
KERNEL=="dsp[0-9]*", NAME="sound/%k", SYMLINK="%k"
KERNEL=="mixer", NAME="sound/%k", SYMLINK="%k"
KERNEL=="mixer[0-9]*", NAME="sound/%k", SYMLINK="%k"
KERNEL=="sequencer", NAME="sound/%k", SYMLINK="%k"
KERNEL=="sequencer[0-9]*", NAME="sound/%k", SYMLINK="%k"
# input devices
KERNEL=="mice", NAME="input/%k", MODE="0644"
KERNEL=="mouse*", NAME="input/%k", MODE="0644"
KERNEL=="event*", NAME="input/%k", MODE="0600"
KERNEL=="js*", NAME="input/%k", MODE="0644"
KERNEL=="ts*", NAME="input/%k", MODE="0600"
# USB devices
KERNEL=="hiddev*", NAME="usb/%k"
KERNEL=="auer*", NAME="usb/%k"
KERNEL=="legousbtower*", NAME="usb/%k"
KERNEL=="dabusb*", NAME="usb/%k"
BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k"
# CAPI devices
KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20"
KERNEL=="capi*", NAME="capi/%n"
# network devices
KERNEL=="tun", NAME="net/%k"
# raw devices
KERNEL=="raw[0-9]*", NAME="raw/%k"
# framebuffer devices
KERNEL=="fb[0-9]*", NAME="fb/%n", SYMLINK="%k", GROUP="video"
# V4L devices
KERNEL=="video[0-9]*", NAME="v4l/video%n", SYMLINK="video%n", GROUP="video"
KERNEL=="radio[0-9]*", NAME="v4l/radeo%n", SYMLINK="radeo%n", GROUP="video"
KERNEL=="vbi[0-9]*", NAME="v4l/vbi%n", SYMLINK="vbi%n", GROUP="video"
KERNEL=="vtx[0-9]*", NAME="v4l/vtx%n", SYMLINK="vtx%n", GROUP="video"
# DVB devices
KERNEL=="dvb*", PROGRAM="/etc/udev/scripts/dvb.sh %k", NAME="%c", GROUP="video", MODE="0660"
# I2C devices
KERNEL=="i2c-[0-9]*", NAME="i2c/%n", SYMLINK="%k"
# misc devices
KERNEL=="agpgart", NAME="misc/%k", SYMLINK="%k", MODE="0664"
KERNEL=="psaux", NAME="misc/%k", SYMLINK="%k", MODE="0664"
KERNEL=="rtc", NAME="misc/%k", SYMLINK="%k", MODE="0664"
KERNEL=="inotify", NAME="misc/%k", SYMLINK="%k", MODE="0664"
# tty devices
KERNEL=="console", NAME="%k", GROUP="tty", MODE="0600"
KERNEL=="tty", NAME="%k", GROUP="tty", MODE="0666"
KERNEL=="tty[0-9]*", NAME="vc/%n", SYMLINK="%k", GROUP="tty"
KERNEL=="ttyS[0-9]*", NAME="tts/%n", SYMLINK="%k", GROUP="tty"
KERNEL=="ttyUSB[0-9]*", NAME="tts/USB%n", GROUP="tty", MODE="0600"
# mem devices
KERNEL=="random", NAME="%k", MODE="0666"
KERNEL=="urandom", NAME="%k", MODE="0444"
KERNEL=="mem", NAME="%k", MODE="0640"
KERNEL=="kmem", NAME="%k", MODE="0640"
KERNEL=="port", NAME="%k", MODE="0640"
KERNEL=="full", NAME="%k", MODE="0666"
KERNEL=="null", NAME="%k", MODE="0666"
KERNEL=="zero", NAME="%k", MODE="0666"
# pty devices
KERNEL=="ptmx", NAME="%k", GROUP="tty", MODE="0666"
KERNEL=="pty[p-za-f][0-9a-f]*", NAME="pty/m%n", SYMLINK="%k", GROUP="tty"
KERNEL=="tty[p-za-f][0-9a-f]*", NAME="pty/s%n", SYMLINK="%k", GROUP="tty"
# emulate dev.d and hotplug.d
ENV{UDEVD_EVENT}=="1", RUN+="/lib/udev/udev_run_hotplugd"
RUN+="/lib/udev/udev_run_devd"

View File

@ -1,88 +0,0 @@
*** Use the README instead, this file is outdated. ***
README for udev
TITLE: Replace devfs with udev
CRUX VERSION: 1.3+
AUTHOR: CRUX ML members
CATEGORY: filesystem
SYNOPSIS: What to do to get udev running
HINT:
* install hotplug and udev ports (and optionally coldplug)
(and their dependencies) from CLC
* Kernel config:
* disable devfs support
* enable hotplug support
* enable tmpfs support
* (optional) add coldplug to the SERVICES array in /etc/rc.conf
* make the following changes in /etc/rc & /etc/rc.single:
(remember that "-" means the line gets removed,
and "+" means the lines gets added. ;-))
* /etc/rc diff:
- # Start device management daemon
- /sbin/devfsd /dev
+ # Start udev
+ /bin/mount -t sysfs none /sys
+ /bin/mount -t proc none /proc
+ /sbin/start_udev
*** NOTE ***
Han Boetes suggests this as a better way to mount the sysfs
and proc filesystems to avoid problems with improperly unmounted
filesystems being unfixable when their devices are missing due
to a failed udev start:
if ! /bin/mount -t sysfs none /sys; then
/bin/mount -n -t sysfs none /sys
fi
if ! /bin/mount -t proc none /proc; then
/bin/mount -n -t proc none /proc
fi
************
* /etc/rc.single diff:
- # Start device management daemon
- /sbin/devfsd /dev
+ # Start udev
+ /bin/mount -t sysfs none /sys
+ /bin/mount -t proc none /proc
+ /sbin/start_udev
*** see NOTE above ***
* comment or remove the following fstab entries:
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
* add the additional fstab entries (if needed):
(these are in the default fstab, commented)
none /proc/bus/usb usbfs defaults 0 0
none /dev/pts devpts defaults 0 0
* reboot and cross fingers
_________________________________________________________________
If you want to allow users to access the sound and video devices
(nvidia, dri, etc.), add an 'audio' group and a 'video' group to
the system. CRUX's udev install sets the appropriate group
permissions, so just add the user to the 'audio' and 'video'
groups (and log out/back in).
_________________________________________________________________

View File

@ -1,170 +0,0 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# modified for crux 12.20.2005 (jaeger)
udev_version() {
local version=0
if [[ -x /sbin/udev ]] ; then
version=$(/sbin/udev -V)
# We need it without a leading '0', else bash do the wrong thing
version=${version##0}
# Older udevs will print nothing
[[ -z ${version} ]] && version=0
fi
echo "${version}"
}
# This works for 2.6.15 kernels or greater
trigger_events() {
list=""
# if you want real coldplug (with all modules being loaded for all
# devices in the system), uncomment out the next line.
#list="$list $(echo /sys/bus/*/devices/*/uevent)"
list="$list $(echo /sys/class/*/*/uevent)"
list="$list $(echo /sys/block/*/uevent /sys/block/*/*/uevent)"
for i in $list; do
case "$i" in
*/device/uevent)
# skip followed device symlinks
continue
;;
*/class/mem/*|*/class/tty/*)
first="$first $i"
;;
*/block/md*)
last="$last $i"
;;
*/*)
default="$default $i"
;;
esac
done
# trigger the sorted events
for i in $first $default $last; do
echo "add" > "$i"
done
}
populate_udev() {
# populate /dev with devices already found by the kernel
#if [ "$(get_KV)" -gt "$(KV_to_int '2.6.14')" ] ; then
#ebegin "Populating /dev with existing devices through uevents"
#trigger_events
#eend 0
#else
echo "Populating /dev with existing devices with udevstart..."
/sbin/udevstart
#fi
# loop until everything is finished
# there's gotta be a better way...
echo "Letting udev process events..."
loop=0
while test -d /dev/.udev/queue; do
sleep 0.1;
test "$loop" -gt 300 && break
loop=$(($loop + 1))
done
#einfo "loop = $loop"
return 0
}
seed_dev() {
# Seed /dev with some things that we know we need
echo "Seeding /dev with needed nodes..."
# copy over any persistant things
cp --preserve=all --recursive --update /lib/udev/devices/* /dev
# Not provided by sysfs but needed
ln -snf /proc/self/fd /dev/fd
ln -snf fd/0 /dev/stdin
ln -snf fd/1 /dev/stdout
ln -snf fd/2 /dev/stderr
[[ -e /proc/kcore ]] && ln -snf /proc/kcore /dev/core
# Create problematic directories
mkdir -p /dev/{pts,shm}
}
main() {
# Setup temporary storage for /dev
#echo "Mounting /dev for udev"
#if [[ ${RC_USE_FSTAB} == "yes" ]] ; then
#mntcmd=$(get_mount_fstab /dev)
#else
#unset mntcmd
#fi
#if [[ -n ${mntcmd} ]] ; then
#try mount -n ${mntcmd}
#else
#if egrep -qs tmpfs /proc/filesystems ; then
mntcmd="tmpfs"
#else
#mntcmd="ramfs"
#fi
# many video drivers require exec access in /dev #92921
mount -n -t ${mntcmd} udev /dev -o exec,nosuid,mode=0755
#fi
#eend $?
# Selinux lovin; /selinux should be mounted by selinux-patched init
#if [[ -x /sbin/restorecon && -c /selinux/null ]] ; then
#restorecon /dev &> /selinux/null
#fi
# Actually get udev rolling
#if [[ ${RC_DEVICE_TARBALL} == "yes" && \
#-s /lib/udev-state/devices.tar.bz2 ]] ; then
#ebegin "Populating /dev with saved device nodes"
#try tar -jxpf /lib/udev-state/devices.tar.bz2 -C /dev
#eend $?
#fi
seed_dev
# Setup hotplugging (if possible)
echo -n "Setting up hotplug agent... "
if [[ -e /proc/sys/kernel/hotplug ]] ; then
#if [ "$(get_KV)" -gt "$(KV_to_int '2.6.14')" ] ; then
#einfo " Using netlink for hotplug events..."
#echo "" > /proc/sys/kernel/hotplug
if [[ $(udev_version) -ge "48" ]] ; then
echo "/sbin/udevsend"
echo "/sbin/udevsend" > /proc/sys/kernel/hotplug
elif [[ -x /sbin/hotplug ]] ; then
echo "/sbin/hotplug"
else
echo "/sbin/udev"
echo "/sbin/udev" > /proc/sys/kernel/hotplug
fi
fi
#eend 0
echo "Starting udevd..."
/sbin/udevd --daemon
#eend $?
populate_udev
# Create nodes that udev can't
echo "Finalizing udev configuration..."
[[ -x /sbin/dmsetup ]] && /sbin/dmsetup mknodes &>/dev/null
[[ -x /sbin/lvm ]] && \
/sbin/lvm vgscan -P --mknodes --ignorelockingfailure &>/dev/null
[[ -x /sbin/evms_activate ]] && /sbin/evms_activate -q &>/dev/null
#eend 0
# Same thing as /dev/.devfsd
touch /dev/.udev
}
main
# vim:ts=4

View File

@ -1,309 +0,0 @@
# /etc/udev/rules/50-udev.rules: device naming rules for udev
#
# Gentoo specific rules
#
# There are a number of modifiers that are allowed to be used in some of the
# fields. See the udev man page for a full description of them.
#
# Try not to modify this file, if you wish to change things, create a new rule
# file that can be run before this one.
#
# console
KERNEL=="pty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", OPTIONS="last_rule"
KERNEL=="tty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k", GROUP="tty", OPTIONS="last_rule"
KERNEL=="vcs*", NAME="%k", GROUP="tty", OPTIONS="last_rule"
KERNEL=="vcsa*", NAME="%k", GROUP="tty", OPTIONS="last_rule"
KERNEL=="tty", NAME="%k", GROUP="tty", MODE="0666", OPTIONS="last_rule"
KERNEL=="tty[0-9]", NAME="%k", GROUP="tty", SYMLINK="vc/%n", OPTIONS="last_rule"
KERNEL=="tty[0-9][0-9]", NAME="%k", GROUP="tty", SYMLINK="vc/%n", OPTIONS="last_rule"
KERNEL=="console", NAME="%k", GROUP="tty", MODE="0600"
KERNEL=="ptmx", NAME="%k", GROUP="tty", MODE="0666"
# tty devices
KERNEL=="ttyS[0-9]*", NAME="%k", SYMLINK="tts/%n", GROUP="tty"
KERNEL=="ttyUSB[0-9]*", NAME="%k", SYMLINK="tts/USB%n", GROUP="tty", MODE="0660"
KERNEL=="ippp0", NAME="%k", GROUP="tty"
KERNEL=="isdn*" NAME="%k", GROUP="tty"
KERNEL=="dcbri*", NAME="%k", GROUP="tty"
KERNEL=="ircomm*", NAME="%k", GROUP="tty"
# all block devices
SUBSYSTEM=="block", GROUP="disk"
# cdrom symlinks and other good cdrom naming
BUS=="ide", KERNEL=="hd[a-z]", ACTION=="add", IMPORT="/sbin/cdrom_id --export $tempnode"
BUS=="scsi", KERNEL="sr[0-9]*", ACTION=="add", IMPORT="/sbin/cdrom_id --export $tempnode"
BUS=="scsi", KERNEL="scd[a-z]", ACTION=="add", IMPORT="/sbin/cdrom_id --export $tempnode"
BUS=="scsi", KERNEL="sg[0-9]*", ACTION=="add", DRIVER=="sr", GROUP="disk"
ENV{ID_CDROM}=="?*", SYMLINK+="cdrom%e", GROUP="disk"
ENV{ID_CDROM_CD_RW}=="?*", SYMLINK+="cdrw%e"
ENV{ID_CDROM_DVD}=="?*", SYMLINK+="dvd%e"
ENV{ID_CDROM_DVD_R}=="?*", SYMLINK+="dvdrw%e"
# disk devices
KERNEL=="sd*", NAME="%k", GROUP="disk"
KERNEL=="dasd*", NAME="%k", GROUP="disk"
KERNEL=="ataraid*", NAME="%k", GROUP="disk"
# compaq smart array
KERNEL=="cciss*", PROGRAM="raid-devfs.sh %k", NAME="%c{1}", SYMLINK+="%k"
KERNEL=="ida*", PROGRAM="raid-devfs.sh %k", NAME="%c{1}", SYMLINK+="%k"
# mylex
KERNEL=="rd*", PROGRAM="raid-devfs.sh %k", NAME="%c{1}", SYMLINK+="%k"
# dri devices
KERNEL=="card*", NAME="dri/card%n", GROUP="video"
KERNEL=="nvidia*", NAME="%k", GROUP="video"
KERNEL=="3dfx*", NAME="%k", GROUP="video"
# alsa devices
SUBSYSTEM=="sound", GROUP="audio"
KERNEL=="controlC[0-9]*", NAME="snd/%k"
KERNEL=="hw[CD0-9]*", NAME="snd/%k"
KERNEL=="pcm[CD0-9cp]*", NAME="snd/%k"
KERNEL=="midiC[D0-9]*", NAME="snd/%k"
KERNEL=="timer", NAME="snd/%k"
KERNEL=="seq", NAME="snd/%k"
# capi devices
KERNEL=="capi", NAME="capi20", SYMLINK+="isdn/capi20", GROUP="dialout"
KERNEL=="capi*", NAME="capi/%n", GROUP="dialout"
# cpu devices
KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid"
KERNEL=="msr[0-9]*", NAME="cpu/%n/msr"
KERNEL=="microcode", NAME="cpu/microcode"
# dm devices (ignore them)
KERNEL=="dm-[0-9]*", OPTIONS="ignore_device"
# create a symlink named after the device map name
# note devmap_name comes with extras/multipath
#KERNEL=="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK+="%c"
KERNEL=="device-mapper", NAME="mapper/control"
# fb devices
KERNEL=="fb[0-9]*", NAME="fb/%n", SYMLINK+="%k", GROUP="video"
# floppy devices
KERNEL=="fd[0-9]*", NAME="floppy/%n", SYMLINK+="%k", GROUP="floppy"
# i2c devices
KERNEL=="i2c-[0-9]*", NAME="i2c/%n", SYMLINK+="%k"
# input devices
KERNEL=="mice", NAME="input/%k", MODE="0644"
KERNEL=="mouse*", NAME="input/%k", MODE="0644"
KERNEL=="event*", NAME="input/%k", MODE="0600"
KERNEL=="js*", NAME="input/%k", MODE="664"
KERNEL=="ts*", NAME="input/%k", MODE="0600"
# loop devices
KERNEL=="loop[0-9]*", NAME="loop/%n", SYMLINK+="%k", GROUP="disk"
# md block devices
KERNEL=="md[0-9]*", NAME="md/%n", SYMLINK+="%k", GROUP="disk"
# aoe char devices,
SUBSYSTEM=="aoe", KERNEL=="discover", NAME="etherd/%k", GROUP="disk", MODE="0220"
SUBSYSTEM=="aoe", KERNEL=="err", NAME="etherd/%k", GROUP="disk", MODE="0440"
SUBSYSTEM=="aoe", KERNEL=="interfaces", NAME="etherd/%k", GROUP="disk", MODE="0220"
# misc devices
KERNEL=="agpgart", NAME="misc/%k", SYMLINK+="%k"
KERNEL=="psaux", NAME="misc/%k", SYMLINK+="%k"
KERNEL=="rtc", NAME="misc/%k", SYMLINK+="%k", MODE="0664"
KERNEL=="uinput", NAME="misc/%k", SYMLINK+="%k"
KERNEL=="inotify", NAME="misc/%k", SYMLINK+="%k", MODE="0666"
# netlink devices
KERNEL=="route", NAME="netlink/%k"
KERNEL=="skip", NAME="netlink/%k"
KERNEL=="usersock", NAME="netlink/%k"
KERNEL=="fwmonitor", NAME="netlink/%k"
KERNEL=="tcpdiag", NAME="netlink/%k"
KERNEL=="nflog", NAME="netlink/%k"
KERNEL=="xfrm", NAME="netlink/%k"
KERNEL=="arpd", NAME="netlink/%k"
KERNEL=="route6", NAME="netlink/%k"
KERNEL=="ip6_fw", NAME="netlink/%k"
KERNEL=="dnrtmsg", NAME="netlink/%k"
KERNEL=="tap*", NAME="netlink/%k"
# network devices
KERNEL=="tun", NAME="net/%k", MODE="0600"
# ramdisk devices
KERNEL=="ram[0-9]*", NAME="rd/%n", SYMLINK+="%k"
# IEEE1394 (firewire) devices (must be before raw devices below)
KERNEL=="raw1394", NAME="%k", GROUP="video"
KERNEL=="dv1394*", NAME="dv1394/%n", GROUP="video"
KERNEL=="video1394*", NAME="video1394/%n", GROUP="video"
# raw devices
KERNEL=="raw[0-9]*", NAME="raw/%k", GROUP="disk"
KERNEL=="ram*", NAME="%k", GROUP="disk"
# sound devices
KERNEL=="adsp", NAME="sound/%k", SYMLINK+="%k", GROUP="audio"
KERNEL=="adsp[0-9]*", NAME="sound/%k", SYMLINK+="%k", GROUP="audio"
KERNEL=="audio", NAME="sound/%k", SYMLINK+="%k", GROUP="audio"
KERNEL=="audio[0-9]*", NAME="sound/%k", SYMLINK+="%k", GROUP="audio"
KERNEL=="dsp", NAME="sound/%k", SYMLINK+="%k", GROUP="audio"
KERNEL=="dsp[0-9]*", NAME="sound/%k", SYMLINK+="%k", GROUP="audio"
KERNEL=="mixer", NAME="sound/%k", SYMLINK+="%k", GROUP="audio"
KERNEL=="mixer[0-9]*", NAME="sound/%k", SYMLINK+="%k", GROUP="audio"
KERNEL=="sequencer", NAME="sound/%k", SYMLINK+="%k", GROUP="audio"
KERNEL=="sequencer[0-9]*", NAME="sound/%k", SYMLINK+="%k", GROUP="audio"
# memory devices
KERNEL=="random", NAME="%k", MODE="0666"
KERNEL=="urandom", NAME="%k", MODE="0444"
KERNEL=="mem", NAME="%k", MODE="0640"
KERNEL=="kmem", NAME="%k", MODE="0640"
KERNEL=="port", NAME="%k", MODE="0640"
KERNEL=="full", NAME="%k", MODE="0666"
KERNEL=="null", NAME="%k", MODE="0666"
KERNEL=="zero", NAME="%k", MODE="0666"
# usb devices
KERNEL=="hiddev*", NAME="usb/%k"
KERNEL=="auer*", NAME="usb/%k"
KERNEL=="legousbtower*", NAME="usb/%k", GROUP="usb"
KERNEL=="dabusb*", NAME="usb/%k"
BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb/%k", GROUP="lp"
# v4l devices
KERNEL=="video[0-9]*", NAME="v4l/video%n", SYMLINK+="video%n", GROUP="video"
KERNEL=="radio[0-9]*", NAME="v4l/radio%n", SYMLINK+="radio%n", GROUP="video"
KERNEL=="vbi[0-9]*", NAME="v4l/vbi%n", SYMLINK+="vbi%n", GROUP="video"
KERNEL=="vtx[0-9]*", NAME="v4l/vtx%n", GROUP="video"
# dvb devices
SUBSYSTEM=="dvb", PROGRAM="/bin/sh -c 'K=%k; K=$${K#dvb}; printf dvb/adapter%%i/%%s $${K%%%%.*} $${K#*.}'", NAME="%c", GROUP="video"
# Asterisk Zaptel devices
KERNEL=="zapctl", NAME="zap/ctl"
KERNEL=="zaptimer", NAME="zap/timer"
KERNEL=="zapchannel", NAME="zap/channel"
KERNEL=="zappseudo", NAME="zap/pseudo"
KERNEL=="zap[0-9]*", NAME="zap/%n"
# pilot/palm devices
KERNEL=="pilot", NAME="%k", GROUP="uucp"
# jaz devices
KERNEL=="jaz*", NAME="%k", GROUP="disk"
# zip devices
KERNEL=="pocketzip*", NAME="%k", GROUP="disk"
KERNEL=="zip*", NAME="%k", GROUP="disk"
# ls120 devices
KERNEL=="ls120", NAME="%k", GROUP="disk"
# lp devices
KERNEL=="lp*", NAME="%k", GROUP="lp"
KERNEL=="irlpt", NAME="%k", GROUP="lp"
KERNEL=="usblp", NAME="%k", GROUP="lp"
KERNEL=="lp*", NAME="%k", GROUP="lp"
KERNEL=="parport*", NAME="%k", GROUP="lp"
# tape devices
KERNEL=="ht*", NAME="%k", GROUP="tape"
KERNEL=="nht*", NAME="%k", GROUP="tape"
KERNEL=="pt*", NAME="%k", GROUP="tape"
KERNEL=="npt*", NAME="%k", GROUP="tape"
KERNEL=="st*", NAME="%k", GROUP="tape"
KERNEL=="nst*", NAME="%k", GROUP="tape"
KERNEL=="osst*", NAME="%k", GROUP="tape"
KERNEL=="nosst*", NAME="%k", GROUP="tape"
# diskonkey devices
KERNEL=="diskonkey*", NAME="%k", GROUP="disk"
# rem_ide devices
KERNEL=="microdrive*", NAME="%k", GROUP="disk"
# kbd devices
KERNEL=="kbd", NAME="%k", MODE="0664"
# Sony Vaio Jogdial sonypi device
KERNEL=="sonypi", NAME="%k", MODE="0666"
# packet devices
KERNEL=="pktcdvd", NAME="pktcdvd/control", GROUP="cdrw", MODE="0660"
KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/pktcdvd%n", GROUP="cdrw", MODE="0660"
# infiniband devices
KERNEL=="umad*", NAME="infiniband/%k"
KERNEL=="issm*", NAME="infiniband/%k"
# tpm devices
KERNEL=="tpm*", NAME="%k", OWNER="tss", GROUP="tss", MODE="0600"
#######################################
# Persistant block device stuff - begin
#######################################
# Skip all of this if we are not adding a block device
ACTION!="add", GOTO="persistent_end"
SUBSYSTEM!="block", GOTO="persistent_end"
KERNEL=="ram*|loop*|fd*|nbd*", GOTO="persistent_end"
# skip accessing removable ide devices, cause the ide drivers are horrible broken
BUS=="ide", SYSFS{removable}="1", GOTO="no_volume_id"
BUS=="ide", SYSFS{../removable}="1", GOTO="no_volume_id"
# persistent disk device links /dev/disk/
KERNEL=="hd*[!0-9]", IMPORT="/sbin/ata_id --export $tempnode"
KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}"
KERNEL=="hd*[0-9]", IMPORT{parent}=="ID_*", SYMLINK+="disk/by-id/ata-$env{ID_MODEL}_$env{ID_SERIAL}-part%n"
KERNEL=="sd*[!0-9]", SYSFS{ieee1394_id}=="*", IMPORT="/bin/echo -e 'ID_SERIAL=$sysfs{ieee1394_id}\nID_BUS=ieee1394'"
KERNEL=="sd*[!0-9]", ENV{ID_SERIAL}=="", IMPORT="/sbin/usb_id -x"
KERNEL=="sd*[!0-9]", ENV{ID_SERIAL}=="", IMPORT="/sbin/scsi_id -g -x -s %p -d %N"
KERNEL=="sd*[!0-9]", ENV{ID_SERIAL}=="", IMPORT="/sbin/scsi_id -g -x -a -s %p -d %N"
KERNEL=="sd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
KERNEL=="sd*[0-9]", IMPORT{parent}=="ID_*"
KERNEL=="sd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
# Skip id for ram / loop / fd
KERNEL=="ram*", GOTO="no_volume_id"
KERNEL=="loop*", GOTO="no_volume_id"
KERNEL=="fd*", GOTO="no_volume_id"
KERNEL=="*[!0-9]", ENV{ID_TYPE}=="?*", IMPORT="/sbin/path_id %p", SYMLINK+="disk/by-path/$env{ID_PATH}"
KERNEL=="*[0-9]", IMPORT{parent}=="ID_*"
KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"
# volume-label/uuid
KERNEL=="*[!0-9]", SYSFS{removable}=="1", GOTO="no_volume_id"
KERNEL=="sr*", GOTO="no_volume_id"
KERNEL=="*[0-9]", IMPORT="/sbin/vol_id --export $tempnode"
KERNEL=="*[0-9]", ENV{ID_FS_UUID}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
KERNEL=="*[0-9]", ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
LABEL="no_volume_id"
LABEL="persistent_end"
#####################################
# Persistant block device stuff - end
#####################################
# usbfs-like device nodes
SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev}; printf bus/usb/%%03i/%%03i $${K%%%%.*} $${K#*.}'", NAME="%c", MODE="0644"
# be backward compatible for a while with the /etc/dev.d and /etc/hotplug.d/ systems
# run /etc/hotplug.d/ stuff only if we came from a hotplug event, not for udevstart
ENV{UDEVD_EVENT}=="1", RUN+="/lib/udev/udev_run_hotplugd $env{SUBSYSTEM}"
# always run /etc/dev.d/ stuff for now.
RUN+="/lib/udev/udev_run_devd $env{SUBSYSTEM}"
# debugging monitor
RUN+="socket:/org/kernel/udev/monitor"

View File

@ -1,8 +0,0 @@
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/man/
drwxr-xr-x root/root usr/man/man8/
-rw-r--r-- root/root usr/man/man8/lsusb.8.gz
drwxr-xr-x root/root usr/sbin/
-rwxr-xr-x root/root usr/sbin/lsusb
drwxr-xr-x root/root usr/share/
-rw-r--r-- root/root usr/share/usb.ids

View File

@ -1 +0,0 @@
05276dc307a0297904bc892e9998bf59 usbutils-0.70.tar.gz

View File

@ -1,16 +0,0 @@
# Description: pciutils-like utilities for USB
# URL: http://libusb.sourceforge.net/
# Maintainer: Matt Housh, jaeger at morpheus dot net
# Depends on: libusb
name=usbutils
version=0.70
release=1
source=(http://dl.sourceforge.net/sourceforge/linux-usb/$name-$version.tar.gz)
build() {
cd $name-$version
./configure --prefix=/usr
make
make DESTDIR=$PKG install
}