diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-04-02 20:34:34 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-04-02 20:34:34 +0000 |
commit | eaa1c24f934d510206651b3314b6b81cc82b9faa (patch) | |
tree | 9b1e6d0848618d7480d72378a6a7d77b1914e081 | |
parent | 7c3d7f157a3758fc19a0d67dbd9ed8a0d356c58e (diff) |
Update the sample udev astribank_hook for TwinStar
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@6312 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rwxr-xr-x | drivers/dahdi/xpp/astribank_hook.sample | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/dahdi/xpp/astribank_hook.sample b/drivers/dahdi/xpp/astribank_hook.sample index 7cd0497..9510f7b 100755 --- a/drivers/dahdi/xpp/astribank_hook.sample +++ b/drivers/dahdi/xpp/astribank_hook.sample @@ -1,8 +1,18 @@ #! /bin/sh me=`basename $0` +dir=`dirname $0` LOGGER="logger -i -t '$me'" +# Always redirect stderr somewhere, otherwise the shell script will die +# when it tries to do I/O related stuff on closed file descriptor. +# Our default is to throw it down the bit-bucket. +#exec 2> /dev/console +## If you wish to trace this script: +#exec 2> "/tmp/${me}_$XBUS_NAME" 1>&2 + +PATH="$dir:/usr/sbin:/sbin:/usr/bin:/bin" + set -e echo "starting($ACTION): '$*'" | $LOGGER @@ -13,8 +23,14 @@ add) remove) ;; online) + if [ -x "$dir/twinstar_hook" ]; then + "$dir/twinstar_hook" + fi ;; offline) + if [ -x "$dir/twinstar_hook" ]; then + "$dir/twinstar_hook" + fi ;; *) echo "$0: Unknown ACTION='$ACTION'" | $LOGGER |