Home | History | Annotate | Line # | Download | only in devpubd
devpubd-run-hooks.in revision 1.2.18.1
      1 #!/bin/sh
      2 #
      3 # $NetBSD: devpubd-run-hooks.in,v 1.2.18.1 2015/02/17 14:45:31 martin Exp $
      4 #
      5 # devpubd run hooks
      6 
      7 devpubd_event=$1
      8 shift
      9 devpubd_devices=$@
     10 devpubd_hooks_base=@HOOKSDIR@
     11 
     12 case $devpubd_event in
     13 device-attach|device-detach)
     14 	for hook in ${devpubd_hooks_base}/*; do
     15 		if [ -x "${hook}" ]; then
     16 			"${hook}" ${devpubd_event} ${devpubd_devices}
     17 		fi
     18 	done
     19 	;;
     20 *)
     21 	;;
     22 esac
     23 
     24 exit 0
     25