1#!/bin/sh 2# 3# $NetBSD: devpubd-run-hooks.in,v 1.3 2015/02/15 15:56:30 jmcneill Exp $ 4# 5# devpubd run hooks 6 7devpubd_event=$1 8shift 9devpubd_devices=$@ 10devpubd_hooks_base=@HOOKSDIR@ 11 12case $devpubd_event in 13device-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 ;; 22esac 23 24exit 0 25