#!/bin/sh #---------------------------------------------------------------------------- #/var/install/bin/dahdi-server-list-controller # # Creation: 2014-11-29 hbfl # Last Update: $Id$ # # Copyright (c) 2014-@@YEAR@@ Holger Bruenjes, holgerbruenjes(at)gmx(dot)net # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- # read eislib . /var/install/include/eislib #exec 2>/tmp/dahdi-controller-trace$$.log #set -x clrhome mecho --info "List installed dahdi controller(s)" echo echo "Detecting Dahdi-Devices ..." echo dahdi_devices="$(/usr/sbin/dahdi_hardware | /usr/bin/gawk '{print $2 "|" substr($0,index($0,$4)) }')" techo --begin '5 18 2 50*' techo --row '' --info 'Dahdi driver' '' --info 'Hardware name' echo "${dahdi_devices}" | while read line do _drv=$(echo ${line} | cut -d '|' -f1) _activ=$(echo ${_drv} | cut -c ${#_drv}) _name=$(echo ${line} | cut -d '|' -f2) techo --row '' "${_drv%[+-]}" "${_activ}" "${_name}" done techo --end echo echo echo ' Hint: [+] = Active device' echo ' [-] = Non active device, only installed' echo anykey exit 0 # --------------------------------------------------------------------------- # end # ---------------------------------------------------------------------------