481b9e731c
once with a list of all found devices. This lets us batch calls to MAKEDEV which results in a noticeable improvement in Raspberry Pi boot time. Run the initial device enumeration hooks before detaching from the foreground, ensuring that any required devices have been created before the rc.d script exits.
25 lines
386 B
Bash
Executable File
25 lines
386 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $NetBSD: devpubd-run-hooks.in,v 1.3 2015/02/15 15:56:30 jmcneill Exp $
|
|
#
|
|
# devpubd run hooks
|
|
|
|
devpubd_event=$1
|
|
shift
|
|
devpubd_devices=$@
|
|
devpubd_hooks_base=@HOOKSDIR@
|
|
|
|
case $devpubd_event in
|
|
device-attach|device-detach)
|
|
for hook in ${devpubd_hooks_base}/*; do
|
|
if [ -x "${hook}" ]; then
|
|
"${hook}" ${devpubd_event} ${devpubd_devices}
|
|
fi
|
|
done
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
|
|
exit 0
|