2009-02-19 16:10:13 +01: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
|
|
|
|
|
2009-03-05 02:08:57 +01:00
|
|
|
# We use pkill and rm
|
2009-02-19 16:10:13 +01:00
|
|
|
copy_exec /usr/bin/pkill /sbin
|
2009-03-05 02:08:57 +01:00
|
|
|
copy_exec /bin/rm /bin
|
2009-02-19 16:10:13 +01:00
|
|
|
|
|
|
|
# Copy across the udev binaries
|
2009-03-08 04:14:24 +01:00
|
|
|
copy_exec /usr/lib/klibc/udev/udevd /sbin
|
|
|
|
copy_exec /usr/lib/klibc/udev/udevadm /sbin
|
2009-02-19 16:10:13 +01: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
|
|
|
|
for rules in 50-udev-default.rules 60-persistent-storage.rules \
|
|
|
|
61-persistent-storage-edd.rules 80-drivers.rules 95-udev-late.rules; do
|
|
|
|
cp -p /lib/udev/rules.d/$rules ${DESTDIR}/lib/udev/rules.d
|
|
|
|
done
|
|
|
|
|
|
|
|
# Copy across helpers the rules need
|
|
|
|
mkdir -p ${DESTDIR}/lib/udev
|
|
|
|
# 50-udev-default.rules
|
|
|
|
# 60-persistent-storage.rules
|
2009-03-08 04:14:24 +01:00
|
|
|
#copy_exec /lib/udev/ata_id /lib/udev
|
|
|
|
#copy_exec /lib/udev/usb_id /lib/udev
|
|
|
|
copy_exec /usr/lib/klibc/udev/vol_id /lib/udev
|
|
|
|
#copy_exec /lib/udev/scsi_id /lib/udev
|
|
|
|
copy_exec /usr/lib/klibc/udev/path_id /lib/udev
|