diff options
Diffstat (limited to 'xpp/init_card_4_23')
-rwxr-xr-x | xpp/init_card_4_23 | 22 |
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" |