# copy some extra files to /lib/udev # # # mkdir -p $DESTDIR/lib/udev cpudev() { if [ ! -e "$1" ]; then # don't copy, orig file not exists return fi if [ ! -e "$DESTDIR/$1" ]; then # check if other script have put this file in $DESTDIR cpifexists "$1" "$2" fi } cpudev /lib/udev/write_cd_rules /lib/udev # DON'T COPY write_net_rules, it will hang trying to create new persistent rules !!! #cpudev /lib/udev/write_net_rules /lib/udev cpudev /lib/udev/udev_run_devd /lib/udev cpudev /lib/udev/udev_run_hotplugd /lib/udev cpudev /lib/udev/logger.agent /lib/udev # new for keyboard and mouse rules cpudev /lib/udev/input_id /lib/udev # new udev > 111 cpudev /lib/udev/rule_generator.functions /lib/udev # SATA cdroms (thanks to vidal_joshur at gva dot es for patch ) cpudev /lib/udev/cdrom_id /lib/udev cpudev /lib/udev/scsi_id /lib/udev cpudev /etc/udev/rules.d/60-symlinks.rules /etc/udev/rules.d/ # ubuntu rules (create symlinks /dev/snd/*) cpudev /lib/udev/rules.d/40-alsa.rules /lib/udev/rules.d/ # new udev don't have vol_id => blkid #/sbin/blkid -p -o udev /dev/sdb1 cpudev /sbin/blkid /usr/bin/ # needed by evdev driver cpudev /lib/udev/rules.d/60-persistent-input.rules /lib/udev/rules.d/ cpudev /etc/udev/rules.d/60-persistent-input.rules /etc/udev/rules.d/ # new in Ubuntu Lucid cpudev /lib/udev/rules.d/60-cdrom_id.rules /lib/udev/rules.d/ cpudev /lib/udev/rules.d/60-persistent-alsa.rules /lib/udev/rules.d/ cpudev /lib/udev/rules.d/78-sound-card.rules /lib/udev/rules.d/ cpudev /lib/udev/rules.d/80-drivers.rules /lib/udev/rules.d/ # new xorg+udev rules cpudev /lib/udev/rules.d/64-xorg-xkb.rules /lib/udev/rules.d/ cpudev /lib/udev/rules.d/65-xorg-evdev.rules /lib/udev/rules.d/ cpudev /lib/udev/rules.d/69-xserver-xorg-input-wacom.rules /lib/udev/rules.d/ cpudev /lib/udev/rules.d/78-graphics-card.rules /lib/udev/rules.d/ mkdir -p $DESTDIR/etc/default [ -e /etc/default/keyboard ] && cpifexists /etc/default/keyboard /etc/default/ # console setup cpudev /lib/udev/rules.d/95-keyboard-force-release.rules /lib/udev/rules.d/ cpudev /lib/udev/rules.d/95-keymap.rules /lib/udev/rules.d/ cpudev /lib/udev/rules.d/85-console-setup.rules /lib/udev/rules.d/ cpudev /lib/udev/console-setup-tty /lib/udev/ cpudev /lib/udev/keymap /lib/udev/ [ -d /lib/udev/keymaps/ ] && cp -ra /lib/udev/keymaps $DESTDIR/lib/udev/ cpudev /lib/udev/findkeyboards /lib/udev/ # delete not usessfull rules rm -f $DESTDIR/etc/udev/rules.d/024_hpmud.rules rm -f $DESTDIR/etc/udev/rules.d/025_libgphoto2.rules rm -f $DESTDIR/etc/udev/rules.d/025_logitechmouse.rules rm -f $DESTDIR/etc/udev/rules.d/45-hpdjconsole.rules rm -f $DESTDIR/etc/udev/rules.d/45-hplip.rules rm -f $DESTDIR/etc/udev/rules.d/55-hpmud.rules rm -f $DESTDIR/etc/udev/rules.d/60-persistent-v4l.rules rm -f $DESTDIR/etc/udev/rules.d/70-persistent-cd.rules rm -f $DESTDIR/etc/udev/rules.d/70-persistent-net.rules rm -f $DESTDIR/etc/udev/rules.d/85-pcmcia.rules rm -f $DESTDIR/etc/udev/rules.d/90-hal.rules rm -f $DESTDIR/etc/udev/rules.d/91-permissions.rules # ?????? rm -f $DESTDIR/etc/udev/rules.d/libmtp7.rules rm -f $DESTDIR/etc/udev/rules.d/z60_hdparm.rules rm -f $DESTDIR/etc/udev/rules.d/z60_libccid.rules rm -f $DESTDIR/etc/udev/rules.d/z60_libfprint0.rules rm -f $DESTDIR/etc/udev/rules.d/z60_libpisock9.rules rm -f $DESTDIR/etc/udev/rules.d/z60_libsane-extras.rules rm -f $DESTDIR/etc/udev/rules.d/z60_libsane.rules rm -f $DESTDIR/etc/udev/rules.d/z60_virtualbox-ose.rules # from idefix (sid) rm -f $DESTDIR/etc/udev/rules.d/65_dmsetup.rules # from dartacan (etch) rm -f $DESTDIR/etc/udev/rules.d/020_permissions.rules rm -f $DESTDIR/etc/udev/rules.d/z25_persistent-cd.rules rm -f $DESTDIR/etc/udev/rules.d/z25_persistent-net.rules # from max40 (Ubuntu hardy) rm -f $DESTDIR/etc/udev/rules.d/40-basic-permissions.rules rm -f $DESTDIR/etc/udev/rules.d/40-permissions.rules ### ???? rm -f $DESTDIR/etc/udev/rules.d/45-fuse.rules rm -f $DESTDIR/etc/udev/rules.d/45-legousbtower.rules rm -f $DESTDIR/etc/udev/rules.d/45-libmtp7.rules rm -f $DESTDIR/etc/udev/rules.d/45-libnjb.rules rm -f $DESTDIR/etc/udev/rules.d/45-libgphoto2.rules rm -f $DESTDIR/etc/udev/rules.d/50-huawei.rules rm -f $DESTDIR/etc/udev/rules.d/50-iscan.rules rm -f $DESTDIR/etc/udev/rules.d/50-libpisock9.rules rm -f $DESTDIR/etc/udev/rules.d/55-hpmud.rules rm -f $DESTDIR/etc/udev/rules.d/60-symlinks.rules rm -f $DESTDIR/etc/udev/rules.d/62-bluez-hid2hci.rules rm -f $DESTDIR/etc/udev/rules.d/65-dmsetup.rules rm -f $DESTDIR/etc/udev/rules.d/70-persistent-cd.rules rm -f $DESTDIR/etc/udev/rules.d/70-persistent-net.rules ##rm -f $DESTDIR/etc/udev/rules.d/85-alsa.rules #???? rm -f $DESTDIR/etc/udev/rules.d/85-brltty.rules rm -f $DESTDIR/etc/udev/rules.d/85-hdparm.rules rm -f $DESTDIR/etc/udev/rules.d/85-hplj10xx.rules rm -f $DESTDIR/etc/udev/rules.d/85-pcmcia.rules rm -f $DESTDIR/etc/udev/rules.d/95-hal.rules rm -f $DESTDIR/etc/udev/rules.d/kino.rules # some deprecated and no used rules in my laptop rm -f $DESTDIR/etc/udev/rules.d/56-hp* rm -f $DESTDIR/etc/udev/rules.d/85-rt* rm -f $DESTDIR/etc/udev/rules.d/85-tosh* rm -f $DESTDIR/etc/udev/rules.d/usb_mode* rm -f $DESTDIR/etc/udev/rules.d/z60-hplip* # udev rules are now in /lib/udev/rules.d/ rm -f $DESTDIR/lib/udev/rules.d/90-hal.rules rm -f $DESTDIR/lib/udev/rules.d/91-permissions.rules rm -f $DESTDIR/lib/udev/rules.d/*bluez* rm -f $DESTDIR/lib/udev/rules.d/*libmtp* rm -f $DESTDIR/lib/udev/rules.d/*libpi* rm -f $DESTDIR/lib/udev/rules.d/*libsane* rm -f $DESTDIR/lib/udev/rules.d/*v4l* rm -f $DESTDIR/lib/udev/rules.d/*-dm.* # modify udev script to not wait in init-premount (wait in tcos-top/01busybox) #sed -i -e '/udevadm trigger/s/trigger/trigger --subsystem-match=net/g' $DESTDIR/scripts/init-premount/udev #sed -i -e '/udevadm settle/s/udevadm/#udevadm/g' $DESTDIR/scripts/init-premount/udev #cat $DESTDIR/scripts/init-premount/udev # modify /init script to not call depmod sed -i -e '/depmod/s/depmod/#depmod/g' $DESTDIR/init # remove some init scripts rm -f ${DESTDIR}/scripts/init-premount/devpts rm -f ${DESTDIR}/scripts/init-bottom/dropbear rm -f ${DESTDIR}/scripts/init-premount/dropbear rm -f ${DESTDIR}/scripts/init-bottom/udev cat << EOF > $DESTDIR/lib/udev/rules.d/60-SMARTBoard32.rules #SMART Technologies rules for permissions. KERNEL=="ttyS*", MODE="0666" SUBSYSTEM=="usb", ATTR{idVendor}=="0b8c", MODE="0666" SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_interface", ATTR{idVendor}=="0b8c" SUBSYSTEMS=="usb", DRIVERS=="usb", ATTRS{idVendor}=="0b8c", MODE:="0666" # #Kernel 2.6.32 and greater has a bug that causes the mouse pointer to jump to the top left corner in HID mouse mode. #Disable the event stream for affected products. #Actually the bug began in 2.6.30, but these rules only work on 2.6.32. You need an fdi policy file to work around 2.6.31. KERNEL=="event*", ATTRS{idVendor}=="0b8c", ATTRS{idProduct}=="0001", NAME="SB%k", RUN+="/sbin/tcos-udevd.sh" KERNEL=="event*", ATTRS{idVendor}=="0b8c", ATTRS{idProduct}=="0002", NAME="SB%k", RUN+="/sbin/tcos-udevd.sh" KERNEL=="event*", ATTRS{idVendor}=="0b8c", ATTRS{idProduct}=="0003", NAME="SB%k", RUN+="/sbin/tcos-udevd.sh" KERNEL=="event*", ATTRS{idVendor}=="0b8c", ATTRS{idProduct}=="0004", NAME="SB%k", RUN+="/sbin/tcos-udevd.sh" KERNEL=="event*", ATTRS{idVendor}=="0b8c", ATTRS{idProduct}=="0005", NAME="SB%k", RUN+="/sbin/tcos-udevd.sh" KERNEL=="event*", ATTRS{idVendor}=="0b8c", ATTRS{idProduct}=="0006", NAME="SB%k", RUN+="/sbin/tcos-udevd.sh" KERNEL=="event*", ATTRS{idVendor}=="0b8c", ATTRS{idProduct}=="0007", NAME="SB%k", RUN+="/sbin/tcos-udevd.sh" KERNEL=="event*", ATTRS{idVendor}=="0b8c", ATTRS{idProduct}=="0008", NAME="SB%k", RUN+="/sbin/tcos-udevd.sh" KERNEL=="event*", ATTRS{idVendor}=="0b8c", ATTRS{idProduct}=="000a", NAME="SB%k", RUN+="/sbin/tcos-udevd.sh" KERNEL=="event*", ATTRS{idVendor}=="0b8c", ATTRS{idProduct}=="000b", NAME="SB%k", RUN+="/sbin/tcos-udevd.sh" KERNEL=="event*", ATTRS{idVendor}=="0b8c", ATTRS{idProduct}=="0017", NAME="SB%k", RUN+="/sbin/tcos-udevd.sh" KERNEL=="event*", ATTRS{idVendor}=="0b8c", ATTRS{idProduct}=="0060", NAME="SB%k", RUN+="/sbin/tcos-udevd.sh" KERNEL=="event*", ATTRS{idVendor}=="0b8c", ATTRS{idProduct}=="0061", NAME="SB%k", RUN+="/sbin/tcos-udevd.sh" KERNEL=="event*", ATTRS{idVendor}=="0b8c", ATTRS{idProduct}=="0042", NAME="SB%k", RUN+="/sbin/tcos-udevd.sh" EOF