summaryrefslogtreecommitdiff
path: root/build_tools
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2010-06-28 10:25:34 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2010-06-28 10:25:34 +0000
commit32a645fba40e73c43d1cdadaa8a587ecd52aa58a (patch)
treeac695d6ea611635631796e13ecd20d9afe5d1b9c /build_tools
parent8c2f3507745b768fff34f12e6d735a125c0b8598 (diff)
live_dahdi: regen config or restart asterisk without full reload
Adds commands 'genconf' (for basically: dahdi_genconf; dahdi_cfg) and 'asterisk' (start asterisk) so doing those should not require a full restart. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8814 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'build_tools')
-rwxr-xr-xbuild_tools/live_dahdi32
1 files changed, 24 insertions, 8 deletions
diff --git a/build_tools/live_dahdi b/build_tools/live_dahdi
index 3d6aad5..19a437c 100755
--- a/build_tools/live_dahdi
+++ b/build_tools/live_dahdi
@@ -144,6 +144,20 @@ unload_module() {
rmmod $module
}
+genconf() {
+ GENCONF_PARAMETERS=$DESTDIR/etc/dahdi/genconf_parameters \
+ DAHDI_CONF_FILE=$DESTDIR/etc/dahdi/system.conf \
+ DAHDI_MODS_FILE=$DESTDIR/etc/dahdi/modules \
+ CHAN_DAHDI_CHANNELS_FILE=$DESTDIR/etc/asterisk/dahdi-channels.conf \
+ dahdi_genconf
+ dahdi_cfg -c $DESTDIR/etc/dahdi/system.conf
+ # TODO: fxotune, hpec
+}
+
+run_asterisk() {
+ $AST_SCRIPT start
+}
+
usage() {
me=`basename $0`
echo "$me: Run DAHDI in a test environment"
@@ -157,6 +171,8 @@ usage() {
echo "$me load /etc/init.d/dahdi start"
echo "$me reload /etc/init.d/dahdi restart"
echo "$me xpp-firm (Reset and load xpp firmware)"
+ echo "$me genconf dahdi_genconf; dahdi_cfg"
+ echo "$me asterisk /etc/init.d/asterisk start"
echo "$me rsync TARGET (copy filea to /tmp/live in host TARGET)"
echo "$me exec COMMAND (Run COMMAND in 'live' environment)"
echo ""
@@ -207,18 +223,18 @@ load)
insmod $MODULES_DIR/$module.ko $module_args
done
xpp_startup
- GENCONF_PARAMETERS=$DESTDIR/etc/dahdi/genconf_parameters \
- DAHDI_CONF_FILE=$DESTDIR/etc/dahdi/system.conf \
- DAHDI_MODS_FILE=$DESTDIR/etc/dahdi/modules \
- CHAN_DAHDI_CHANNELS_FILE=$DESTDIR/etc/asterisk/dahdi-channels.conf \
- dahdi_genconf
- dahdi_cfg -c $DESTDIR/etc/dahdi/system.conf
- # TODO: fxotune, hpec
+ genconf
# or find a way to reuse init.d start sequence.
# TODO: A local copy of Asterisk, configured with dahdi_gnconf.
# doable, but trickier.
- $AST_SCRIPT start
+ run_asterisk
+ ;;
+genconf)
+ genconf
+ ;;
+asterisk)
+ run_asterisk
;;
reload)
$0 unload