summaryrefslogtreecommitdiff
path: root/xpp/init_card_4_23
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-11-30 21:46:11 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2006-11-30 21:46:11 +0000
commit9e81e78446308a27fd157ca7943a25457c59075d (patch)
tree37a1e55a7b3c364b1b525ddb2fa00c247ef561c1 /xpp/init_card_4_23
parent4c1daa46b5a30fec3c37558e9d02a8d616c88eda (diff)
r2817@boole: oron | 2006-11-28 13:39:47 +0200
Maintenance branch for asterisk-1.2.x git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@1666 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/init_card_4_23')
-rwxr-xr-xxpp/init_card_4_2322
1 files changed, 16 insertions, 6 deletions
diff --git a/xpp/init_card_4_23 b/xpp/init_card_4_23
index 155a029..7a2e275 100755
--- a/xpp/init_card_4_23
+++ b/xpp/init_card_4_23
@@ -44,10 +44,21 @@ XPP_BASE=/proc/xpp
export XPP_BASE
LOGGER="logger -s -t $me"
+ZAPTEL_BOOT_DEBIAN=${ZAPTEL_BOOT_DEBIAN:-/etc/default/zaptel}
+ZAPTEL_BOOT_FEDORA=${ZAPTEL_BOOT_FEDORA:-/etc/sysconfig/zaptel}
+
+# read default configuration from /etc/default/zaptel
+if [ -r $ZAPTEL_BOOT_DEBIAN ]; then . $ZAPTEL_BOOT_DEBIAN; fi
+if [ -r $ZAPTEL_BOOT_FEDORA ]; then . $ZAPTEL_BOOT_FEDORA; fi
+
+if [ "$DEBUG_CALIBRATION"=1 ]; then
+ LOGGER=":"
+fi
+
# Always redirect stderr somewhere, otherwise the shell script will die
# when it tries to do I/O related stuff on closed file descriptor.
# Our default is to throw it down the bit-bucket.
-exec 2> /dev/null
+exec 2> /dev/console
## If you wish to trace this script:
#exec 2> /tmp/xpp_init_$XPD_NAME
## Altenativly, if you have multiple XBUS'es:
@@ -69,12 +80,12 @@ set_daa_country_params() {
. $INIT_DIR/init_fxo_modes
fi
# Our register numbers are HEXADECIMAL!
- cat <<EOF
+ echo "
31 WD 10 $reg16
31 WD 1A $reg26
31 WD 1E $reg30
31 WD 1F $reg31
-EOF
+"
# for the FXS:
#if [ "$ring_osc" != '' ]; then
# /bin/echo "31 WI __ $ring_osc"
@@ -86,7 +97,7 @@ EOF
# Remove empty lines and commets. Not strictly necessary
# but works around some limitations of the proc interface:
-sed -e 's/[;#].*$//' -e '/^[ ]*$/d' <<END_OF_FILE
+echo "
31 WD 21 28
@@ -141,8 +152,7 @@ sed -e 's/[;#].*$//' -e '/^[ ]*$/d' <<END_OF_FILE
# Set tip to ring voltage to 3.5 volts while off-hook
# instead of default of 3.1
31 WD 1A C0
-
-END_OF_FILE
+" | sed -e 's/[;#].*$//' -e '/^[ ]*$/d'
set_daa_country_params "$opermode"