NetBSD/sbin/devpubd/devpubd-run-hooks.in

24 lines
378 B
Bash
Executable File

#!/bin/sh
#
# $NetBSD: devpubd-run-hooks.in,v 1.2 2011/12/04 13:01:54 jmcneill Exp $
#
# devpubd run hooks
devpubd_event=$1
devpubd_device=$2
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_device}
fi
done
;;
*)
;;
esac
exit 0