3 # zaptel: Loads Asterisk modules
5 # Version: @(#) /etc/rc.d/init.d/zaptel 1.0
7 # chkconfig: 2345 90 10
8 # description: Loads and unloads zaptel modules at boot time and shutdown.
12 # Source function library.
13 . /etc/rc.d/init.d/functions
15 ######################################
17 ######################################
18 MODULES="usb-uhci zaptel wcfxo wcusb"
19 ######################################
24 # It has to be in the module list, otherwise something is wrong
25 if lsmod | grep -c ^$1 >/dev/null; then
35 rmmod $1 >/dev/null 2>&1
36 # If it's still in the module list after removing it, there's something wrong.
37 if lsmod | grep -c ^$1 >/dev/null; then
45 function reverse_modules() {
49 MODULES="$i $MODULES" ;
53 # See how we were called.
56 gprintf "Loading Asterisk modules:\n"
64 gprintf "Unloading Asterisk modules:\n"
79 gprintf "*** Usage: $0 {start|stop|status|restart}\n"