summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xxpp/utils/genzaptelconf21
1 files changed, 7 insertions, 14 deletions
diff --git a/xpp/utils/genzaptelconf b/xpp/utils/genzaptelconf
index 1ee0062..ea81ad4 100755
--- a/xpp/utils/genzaptelconf
+++ b/xpp/utils/genzaptelconf
@@ -29,7 +29,9 @@
# The script uses a number of bash-specific features
# TODO: either ditch them or convert to perl
-# Don't override variables here. Override them in /etc/default/zaptel
+# Don't override variables here.
+# Override them in /etc/default/zaptel o
+#
#
# 0.5.4:
# * fixed a typo: it's waitfor_xpds and not wait_for_xpds
@@ -86,7 +88,8 @@ set_immediate=yes
ZAPCONF_FILE=/etc/zaptel.conf
ZAPATA_FILE=/etc/asterisk/zapata-channels.conf
-ZAPTEL_BOOT=/etc/default/zaptel
+ZAPTEL_BOOT_DEBIAN=${ZAPTEL_BOOT_DEBIAN:-/etc/default/zaptel}
+ZAPTEL_BOOT_FEDORA=${ZAPTEL_BOOT_FEDORA:-/etc/sysconfig/zaptel}
MODLIST_FILE=/etc/modules
exten_base_dir=/etc/asterisk/extensions-phones.d
exten_defs_file=/etc/asterisk/extensions-defs.conf
@@ -102,7 +105,8 @@ tmp_dir=
ALL_MODULES="zaphfc qozap ztgsm wctdm wctdm24xxp wcfxo wcfxs pciradio tor2 torisa wct1xxp wct4xxp wcte11xp wanpipe wcusb xpp_usb"
# read default configuration from /etc/default/zaptel
-if [ -r $ZAPTEL_BOOT ]; then . $ZAPTEL_BOOT; fi
+if [ -r $ZAPTEL_BOOT_DEBIAN ]; then . $ZAPTEL_BOOT_DEBIAN; fi
+if [ -r $ZAPTEL_BOOT_FEDORA ]; then . $ZAPTEL_BOOT_FEDORA; fi
# it is safe to use -c twice: the last one will be used.
ztcfg_cmd="$ZTCFG -c $ZAPCONF_FILE"
@@ -160,17 +164,6 @@ update_module_list() {
done >> "$MODLIST_FILE"
}
-do_update() {
- if [ ! -d `dirname ${ZAPTEL_BOOT}` ]
- then
- return
- fi
- sed -i.bak "s/^$1=.*\$/$1=\"$2\"/" ${ZAPTEL_BOOT}
- if ! grep -q "^$1=" ${ZAPTEL_BOOT}; then
- echo "$1=\"$2\"" >> ${ZAPTEL_BOOT}
- fi
-}
-
update_extensions_defs() {
if [ "$rapid_conf_mode" = 'yes' ]
then