Compare commits

...

No commits in common. "v963" and "v961" have entirely different histories.
v963 ... v961

4 changed files with 79 additions and 101 deletions

View File

@ -1,94 +1,85 @@
#!/bin/bash
########################################################################
# Begin $rc_base/init.d/udev
#! /bin/bash
#
# Description : Udev Boot Script
# udev init script to setup /udev
#
# Authors : Based on Open Suse Udev Rules
# kay.sievers@suse.de
#
# Adapted to : Jim Gifford
# LFS : Alexander E. Patrakov
#
# Version : 00.00
#
# Notes :
#
########################################################################
# chkconfig: 2345 20 80
# description: manage user-space device nodes in /udev
. /etc/init.d/functions
. /etc/udev/udev.conf
prog=udev
sysfs_dir=/sys
bin=/sbin/udev
udevd=/sbin/udevd
udev_root=/dev
remove_extra_nodes () {
# get rid of the extra nodes created in make_extra_nodes()
rm $udev_root/fd
rm $udev_root/stdin
rm $udev_root/stdout
rm $udev_root/stderr
rm $udev_root/core
#rm $udev_root/sndstat
}
case "$1" in
start)
echo -n "Creating /dev in tmpfs..."
mount -n -t tmpfs -o mode=0755 udev /dev
evaluate_retval
start)
# creating /var/lock/subsys if it doesn't exit
if [ ! -d /var/lock/subsys ]; then
mkdir -p /var/lock/subsys
fi
echo -n "Copying static entries..."
cp --preserve=all --recursive /lib/udev/devices/* /dev
evaluate_retval
echo -n "Setting Permissons on /dev/shm..."
chmod 1777 /dev/shm
evaluate_retval
# don't use udev if sysfs is not mounted.
if [ ! -d $sysfs_dir/block ]; then
exit 1
fi
if [ ! -d $udev_root ]; then
mkdir $udev_root
fi
echo "" > /sys/kernel/uevent_helper
#check if /dev ist mounted tmpfs -> else mount tmpfs here
( mount | grep "\/dev " | grep tmpfs ) >/dev/null 2>&1 || mount -t tmpfs none /dev
# start udevd
echo -n "Starting udevd..."
/sbin/udevd --daemon
evaluate_retval
# propogate /udev from /sys - we only need this while we do not
# have initramfs and an early user-space with which to do early
# device bring up
export ACTION=add
echo -n "Creating initial udev device nodes:"
loadproc udevstart
# start coldplugging
echo -n "Performing Coldplugging..."
# unlikely, but we may be faster than the first event
mkdir -p /dev/.udev/queue
# configure all devices
/sbin/udevadm trigger
# this replaces the old loop, exits after all devices are done
/sbin/udevadm settle
print_status success
# We want to start udevd ourselves if it isn't already running. This
# lets udevd run at a sane nice level...
loadproc $udevd --daemon
touch /var/lock/subsys/udev
;;
stop)
echo -n "Stopping udevd..."
killproc /sbin/udevd
stop)
# be careful
echo -n $"Removing udev device nodes: "
export ACTION=remove
killproc $udevd
rm -f /var/lock/subsys/udev
;;
restart)
echo -n "Restarting udevd..."
killproc /sbin/udevd
loadproc /sbin/udevd --daemon
evaluate_retval
status)
if [ -f /var/lock/subsys/udev ]; then
echo $"$prog has run"
exit 0
fi
echo $"$prog is stopped"
exit 3
;;
status)
statusproc /sbin/udevd
restart)
$0 stop
$0 start
;;
reload)
echo -n "Reloading udev rules..."
udevadm control reload_rules
cp --preserve=all --recursive --update /lib/udev/devices/* /dev
evaluate_retval
reload)
# nothing to do here
;;
force-reload)
echo -n "Updating all available device nodes in /dev..."
udevadm control reload_rules
rm -rf /dev/.udev /dev/disk
cp --preserve=all --recursive --update /lib/udev/devices/* /dev
/sbin/udevadm trigger
/sbin/udevadm settle
evaluate_retval
;;
*)
echo "Usage: $0 {start|stop|restart|status|reload|force-reload}"
*)
echo "Usage: $0 {start|stop|status|restart}"
exit 1
;;
esac
exit 0

View File

@ -1,10 +0,0 @@
# DVD+_-RW22JS8 (pci-0000:00:1d.7-usb-0:2:1.0-scsi-0:0:0:0)
ENV{ID_CDROM}=="?*", ENV{ID_SERIAL}=="FREECOM__DVD+_-RW22JS8_FFFFFFFFFFFF-0:0", SYMLINK+="cdrom", ENV{GENERATED}="1"
ENV{ID_CDROM}=="?*", ENV{ID_SERIAL}=="FREECOM__DVD+_-RW22JS8_FFFFFFFFFFFF-0:0", SYMLINK+="cdrw", ENV{GENERATED}="1"
ENV{ID_CDROM}=="?*", ENV{ID_SERIAL}=="FREECOM__DVD+_-RW22JS8_FFFFFFFFFFFF-0:0", SYMLINK+="dvd", ENV{GENERATED}="1"
ENV{ID_CDROM}=="?*", ENV{ID_SERIAL}=="FREECOM__DVD+_-RW22JS8_FFFFFFFFFFFF-0:0", SYMLINK+="dvdrw", ENV{GENERATED}="1"
# DVD+_-RW22JS8 (pci-0000:00:1d.7-usb-0:2:1.0-scsi-0:0:0:0)
ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1d.7-usb-0:2:1.0-scsi-0:0:0:0", SYMLINK+="cdrom1", ENV{GENERATED}="1"
ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1d.7-usb-0:2:1.0-scsi-0:0:0:0", SYMLINK+="cdrw1", ENV{GENERATED}="1"
ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1d.7-usb-0:2:1.0-scsi-0:0:0:0", SYMLINK+="dvd1", ENV{GENERATED}="1"
ENV{ID_CDROM}=="?*", ENV{ID_PATH}=="pci-0000:00:1d.7-usb-0:2:1.0-scsi-0:0:0:0", SYMLINK+="dvdrw1", ENV{GENERATED}="1"

View File

@ -1,3 +0,0 @@
# PCI device 0x8086:0x4220 (ipw2200)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0e:35:41:d0:05", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

View File

@ -22,17 +22,17 @@
#
WDIR=`pwd`
if [ -d /var/install/sysvinit* ]; then
cd etc/init.d
chmod 755 udev
mkdir rc{S,0,6}.d
for i in 0 6; do
cd rc$i.d
ln -s ../udev K91udev
cd ..
done
cd rcS.d
cd etc/init.d
chmod 755 udev
mkdir rc{0,1,2,3,4,5,6}.d
for i in 0 6; do
cd rc$i.d
ln -s ../udev K91udev
cd ..
done
for i in 1 2 3 4 5; do
cd rc$i.d
ln -s ../udev S05udev
cd ..
fi
done
cd $WDIR