diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-12-29 00:46:07 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-12-29 00:46:07 +0000 |
commit | b3641067b55756f83fe1ad5eb5398c590368ad6e (patch) | |
tree | 68d67253f33e0097c9dd8d7a0b8d7c59be7e6a1e | |
parent | 142c61c268b8b852b4134c41e7cfc03cd231f02d (diff) |
* modules now can take parameters from live.conf (${module}_ARGS).
* zapconf's settings are taken from live.conf .
* Added 'reload' for 'unload; load' .
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3570 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rwxr-xr-x | live_zap | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -24,7 +24,7 @@ REMOVE_MODULES="zaptel" if [ -r $DESTDIR/live.conf ]; then . $DESTDIR/live.conf; fi # Detect the modules used in the system: -for mod in `xpp/utils/zaptel_modules`; do +for mod in `xpp/utils/zaptel_drivers`; do case "$mod" in xpp_usb) MODULES_LOAD="$MODULES_LOAD xpp/xpp xpp/xpd_fxs" @@ -136,9 +136,12 @@ load) # TODO: Find a way to use modprobe. # Or implement a way to pass arguments to modules here (yuck) for module in $MODULES_LOAD; do - insmod $MODULES_DIR/$module.ko + eval module_args="\$`basename ${module}`_ARGS" + insmod $MODULES_DIR/$module.ko $module_args done xpp_startup + ZAPTEL_BOOT_DEBIAN=$DESTDIR/live.conf \ + ZAPTEL_BOOT_FEDORA=$DESTDIR/live.conf \ ZAPTEL_FILE=$DESTDIR/etc/zaptel.conf \ ZAPATA_FILE=$DESTDIR/etc/asterisk/zapata-channels.conf \ zapconf @@ -150,6 +153,10 @@ load) # doable, but trickier. $AST_SCRIPT start ;; +reload) + $0 unload + $0 load + ;; help) usage ;; |