2009-02-19 15:10:13 +00:00
|
|
|
#!/bin/sh -e
|
|
|
|
# initramfs hook for udev
|
|
|
|
|
|
|
|
MINKVER="2.6.24"
|
|
|
|
PREREQ=""
|
|
|
|
|
|
|
|
# Output pre-requisites
|
|
|
|
prereqs()
|
|
|
|
{
|
|
|
|
echo "$PREREQ"
|
|
|
|
}
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
prereqs)
|
|
|
|
prereqs
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
|
|
. /usr/share/initramfs-tools/hook-functions
|
|
|
|
|
|
|
|
# Copy across the udev binaries
|
2009-06-20 16:50:06 +00:00
|
|
|
copy_exec /sbin/udevd /sbin
|
|
|
|
copy_exec /sbin/udevadm /sbin
|
2009-02-19 15:10:13 +00:00
|
|
|
|
|
|
|
# Copy udev configuration
|
|
|
|
mkdir -p ${DESTDIR}/etc/udev
|
|
|
|
cp -p /etc/udev/udev.conf ${DESTDIR}/etc/udev
|
|
|
|
|
|
|
|
# Only copy across relevant rules
|
|
|
|
mkdir -p ${DESTDIR}/lib/udev/rules.d
|
2009-12-04 01:39:26 +00:00
|
|
|
|
|
|
|
UDEV_RULES="
|
2012-01-13 09:38:35 +00:00
|
|
|
50-udev-default.rules 60-persistent-storage.rules
|
2010-04-23 09:58:14 +00:00
|
|
|
61-persistent-storage-edd.rules 80-drivers.rules 95-udev-late.rules"
|
2009-12-04 01:39:26 +00:00
|
|
|
|
|
|
|
for f in ${UDEV_RULES}; do
|
|
|
|
cp -p /lib/udev/rules.d/$f ${DESTDIR}/lib/udev/rules.d
|
2009-02-19 15:10:13 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
# Copy across helpers the rules need
|
|
|
|
mkdir -p ${DESTDIR}/lib/udev
|
2011-04-28 15:31:37 +00:00
|
|
|
copy_exec /lib/udev/ata_id /lib/udev
|
|
|
|
copy_exec /lib/udev/cdrom_id /lib/udev
|
|
|
|
copy_exec /lib/udev/edd_id /lib/udev
|
|
|
|
copy_exec /lib/udev/scsi_id /lib/udev
|