From ecc65d80b45261573e0ee298de60da0ecb41fa28 Mon Sep 17 00:00:00 2001 From: tzafrir Date: Sun, 16 Sep 2007 14:55:04 +0000 Subject: * Run fxotune automatically on startup. * Make fxotune -s less verbose by default so it won't make noise for the init.d script. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3045 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- fxotune.c | 3 ++- zaptel.init | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/fxotune.c b/fxotune.c index 8999010..b25d8ee 100644 --- a/fxotune.c +++ b/fxotune.c @@ -749,7 +749,8 @@ static int do_set(char *configfilename) fclose(fp); - fprintf(stdout, "fxotune: successfully set echo coeffecients on FXO modules\n"); + if (debug) + fprintf(stdout, "fxotune: successfully set echo coeffecients on FXO modules\n"); return 0; } diff --git a/zaptel.init b/zaptel.init index a7ccc9d..3a18178 100644 --- a/zaptel.init +++ b/zaptel.init @@ -16,6 +16,8 @@ initdir=/etc/init.d ZTCFG=/sbin/ztcfg ZTCFG_CMD="$ZTCFG" # e.g: for a custom zaptel.conf location +FXOTUNE=/sbin/fxotune + # The default syncer Astribank. Usually set automatically to a sane # value by xpp_sync(1) if you have an Astribank. You can set this to an # explicit Astribank (e.g: 01). @@ -192,6 +194,11 @@ case "$1" in echo "No functioning zap hardware found in /proc/zaptel, loading ztdummy" modprobe ztdummy 2> /dev/null fi + + if [ -x "$FXOTUNE" ] && [ -r /etc/fxotune.conf ]; then + $FXOTUNE -s + fi + if [ $system = debian ]; then echo -n "Running ztcfg: " $ZTCFG_CMD 2> /dev/null && echo -n "done" -- cgit v1.2.3