/usr/share/initramfs-tools/hooks/sg3-utils is in sg3-utils-udev 1.42-2ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | #!/bin/sh
# (based on multipath-tools-boot)
PREREQS="udev"
prereqs() { echo "$PREREQS"; }
case $1 in
prereqs)
prereqs
exit 0
;;
esac
if [ ! -x /usr/bin/sg_inq ]; then
exit 0
fi
. /usr/share/initramfs-tools/hook-functions
add_udev_rules()
{
for rules in 55-scsi-sg3_id.rules 58-scsi-sg3_symlink.rules; do
if [ -e /lib/udev/rules.d/$rules ]; then
cp -p /lib/udev/rules.d/$rules $DESTDIR/lib/udev/rules.d/
fi
done
}
copy_exec /usr/bin/sg_inq
add_udev_rules
|