summaryrefslogtreecommitdiff
path: root/xpp/init_card_3_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_3_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_3_23')
-rwxr-xr-xxpp/init_card_3_2319
1 files changed, 14 insertions, 5 deletions
diff --git a/xpp/init_card_3_23 b/xpp/init_card_3_23
index 5698484..3f07578 100755
--- a/xpp/init_card_3_23
+++ b/xpp/init_card_3_23
@@ -46,10 +46,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:
@@ -65,8 +76,7 @@ $LOGGER -p kern.info "$XPD_BUS/$XPD_NAME: Calibrating '$0'"
$LOGGER -p kern.info "$XPD_BUS/$XPD_NAME: Continue '$0'"
-sed -e 's/[;#].*$//' -e '/^[ ]*$/d' <<END_OF_FILE
-
+echo "
# Change SLICs states to "Open state"s (Off,all transfers tristated to avoid data collision), Voltage sense
31 WD 40 00
@@ -169,8 +179,7 @@ sed -e 's/[;#].*$//' -e '/^[ ]*$/d' <<END_OF_FILE
#31 WD 4A 34
#31 WD 4B 10
-
-END_OF_FILE
+" | sed -e 's/[;#].*$//' -e '/^[ ]*$/d'
$LOGGER -p kern.info "$XPD_BUS/$XPD_NAME: Ending '$0'"
exit 0