Compare commits
No commits in common. "v961" and "v963" have entirely different histories.
149
etc/init.d/udev
149
etc/init.d/udev
@ -1,85 +1,94 @@
|
|||||||
#! /bin/bash
|
#!/bin/bash
|
||||||
|
########################################################################
|
||||||
|
# Begin $rc_base/init.d/udev
|
||||||
#
|
#
|
||||||
# udev init script to setup /udev
|
# Description : Udev Boot Script
|
||||||
#
|
#
|
||||||
# chkconfig: 2345 20 80
|
# Authors : Based on Open Suse Udev Rules
|
||||||
# description: manage user-space device nodes in /udev
|
# kay.sievers@suse.de
|
||||||
|
#
|
||||||
|
# Adapted to : Jim Gifford
|
||||||
|
# LFS : Alexander E. Patrakov
|
||||||
|
#
|
||||||
|
# Version : 00.00
|
||||||
|
#
|
||||||
|
# Notes :
|
||||||
|
#
|
||||||
|
########################################################################
|
||||||
|
|
||||||
. /etc/init.d/functions
|
. /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
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
# creating /var/lock/subsys if it doesn't exit
|
echo -n "Creating /dev in tmpfs..."
|
||||||
if [ ! -d /var/lock/subsys ]; then
|
mount -n -t tmpfs -o mode=0755 udev /dev
|
||||||
mkdir -p /var/lock/subsys
|
evaluate_retval
|
||||||
fi
|
|
||||||
|
|
||||||
# don't use udev if sysfs is not mounted.
|
echo -n "Copying static entries..."
|
||||||
if [ ! -d $sysfs_dir/block ]; then
|
cp --preserve=all --recursive /lib/udev/devices/* /dev
|
||||||
exit 1
|
evaluate_retval
|
||||||
fi
|
|
||||||
if [ ! -d $udev_root ]; then
|
|
||||||
mkdir $udev_root
|
|
||||||
fi
|
|
||||||
|
|
||||||
#check if /dev ist mounted tmpfs -> else mount tmpfs here
|
echo -n "Setting Permissons on /dev/shm..."
|
||||||
( mount | grep "\/dev " | grep tmpfs ) >/dev/null 2>&1 || mount -t tmpfs none /dev
|
chmod 1777 /dev/shm
|
||||||
|
evaluate_retval
|
||||||
|
|
||||||
# propogate /udev from /sys - we only need this while we do not
|
echo "" > /sys/kernel/uevent_helper
|
||||||
# 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
|
|
||||||
|
|
||||||
# We want to start udevd ourselves if it isn't already running. This
|
# start udevd
|
||||||
# lets udevd run at a sane nice level...
|
echo -n "Starting udevd..."
|
||||||
loadproc $udevd --daemon
|
/sbin/udevd --daemon
|
||||||
touch /var/lock/subsys/udev
|
evaluate_retval
|
||||||
|
|
||||||
|
# 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
|
||||||
;;
|
;;
|
||||||
|
|
||||||
stop)
|
stop)
|
||||||
# be careful
|
echo -n "Stopping udevd..."
|
||||||
echo -n $"Removing udev device nodes: "
|
killproc /sbin/udevd
|
||||||
export ACTION=remove
|
|
||||||
killproc $udevd
|
|
||||||
rm -f /var/lock/subsys/udev
|
|
||||||
;;
|
;;
|
||||||
status)
|
|
||||||
if [ -f /var/lock/subsys/udev ]; then
|
|
||||||
echo $"$prog has run"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
echo $"$prog is stopped"
|
|
||||||
exit 3
|
|
||||||
;;
|
|
||||||
restart)
|
|
||||||
$0 stop
|
|
||||||
$0 start
|
|
||||||
;;
|
|
||||||
reload)
|
|
||||||
# nothing to do here
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Usage: $0 {start|stop|status|restart}"
|
|
||||||
exit 1
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
restart)
|
||||||
|
echo -n "Restarting udevd..."
|
||||||
|
killproc /sbin/udevd
|
||||||
|
loadproc /sbin/udevd --daemon
|
||||||
|
evaluate_retval
|
||||||
|
;;
|
||||||
|
|
||||||
|
status)
|
||||||
|
statusproc /sbin/udevd
|
||||||
|
;;
|
||||||
|
|
||||||
|
reload)
|
||||||
|
echo -n "Reloading udev rules..."
|
||||||
|
udevadm control reload_rules
|
||||||
|
cp --preserve=all --recursive --update /lib/udev/devices/* /dev
|
||||||
|
evaluate_retval
|
||||||
|
;;
|
||||||
|
|
||||||
|
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}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
10
etc/udev/rules.d/70-persistent-cd.rules
Normal file
10
etc/udev/rules.d/70-persistent-cd.rules
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# 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"
|
3
etc/udev/rules.d/70-persistent-net.rules
Normal file
3
etc/udev/rules.d/70-persistent-net.rules
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
|
||||||
|
# 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"
|
16
init/genpkg
16
init/genpkg
@ -22,17 +22,17 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
WDIR=`pwd`
|
WDIR=`pwd`
|
||||||
cd etc/init.d
|
if [ -d /var/install/sysvinit* ]; then
|
||||||
chmod 755 udev
|
cd etc/init.d
|
||||||
mkdir rc{0,1,2,3,4,5,6}.d
|
chmod 755 udev
|
||||||
for i in 0 6; do
|
mkdir rc{S,0,6}.d
|
||||||
|
for i in 0 6; do
|
||||||
cd rc$i.d
|
cd rc$i.d
|
||||||
ln -s ../udev K91udev
|
ln -s ../udev K91udev
|
||||||
cd ..
|
cd ..
|
||||||
done
|
done
|
||||||
for i in 1 2 3 4 5; do
|
cd rcS.d
|
||||||
cd rc$i.d
|
|
||||||
ln -s ../udev S05udev
|
ln -s ../udev S05udev
|
||||||
cd ..
|
cd ..
|
||||||
done
|
fi
|
||||||
cd $WDIR
|
cd $WDIR
|
||||||
|
Loading…
Reference in New Issue
Block a user