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 \
|
2009-04-13 05:21:27 +02:00
|
|
|
61-persistent-storage-edd.rules 64-device-mapper.rules \
|
|
|
|
64-md-raid.rules 80-drivers.rules 95-udev-late.rules; do
|
2009-02-19 16:10:13 +01:00
|
|
|
cp -p /lib/udev/rules.d/$rules ${DESTDIR}/lib/udev/rules.d
|
|
|
|
done
|
|
|
|
|
|
|
|
# Copy across helpers the rules need
|
|
|
|
mkdir -p ${DESTDIR}/lib/udev
|
2009-03-08 04:14:24 +01:00
|
|
|
copy_exec /usr/lib/klibc/udev/path_id /lib/udev
|
2009-04-13 05:21:27 +02:00
|
|
|
cp -f /lib/udev/firmware.sh ${DESTDIR}/lib/udev
|