pari: branch asterisknow r1682 - /branches/asterisknow/scripts/editzap.sh

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Fri Oct 12 11:39:10 CDT 2007


Author: pari
Date: Fri Oct 12 11:39:10 2007
New Revision: 1682

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1682
Log:
merging from trunk

Modified:
    branches/asterisknow/scripts/editzap.sh

Modified: branches/asterisknow/scripts/editzap.sh
URL: http://svn.digium.com/view/asterisk-gui/branches/asterisknow/scripts/editzap.sh?view=diff&rev=1682&r1=1681&r2=1682
==============================================================================
--- branches/asterisknow/scripts/editzap.sh (original)
+++ branches/asterisknow/scripts/editzap.sh Fri Oct 12 11:39:10 2007
@@ -8,11 +8,7 @@
 
 ZAPCONF="/etc/zaptel.conf"
 ZTCFG_OUTPUT="/var/lib/asterisk/static-http/config/ztcfg_output.html"
-
-# Note: Changing modules requires sed
-if [ $(which sed) == "" ] ; then
-	error_out("Sed not installed, needed to reload modules, you can do it manually by forcing the modules in via t1e1override")
-fi
+FILENAME="/etc/asterisk/applyzap.conf"
 
 case ${1} in
 	changemodes)
@@ -28,16 +24,15 @@
 				$(modprobe zaptel; modprobe zttranscode; modprobe wct4xxp t1e1override=1; modprobe wcte11xp t1e1override=1; modprobe wct1xxp t1e1override=1; ztcfg)
 			;;
 			*)
-				error_out("No mode to change specified!")
+				error_out "No mode to change specified"
 			;;
 		esac	
 		;;
 	applysettings)	
 		# Split based on ||| delimeter, and apply to zaptel.
-		blob=`echo ${2} | sed 's/|||/\n/g'`
-		mv ${ZAPCONF} ${ZAPCONF}.b4editzap
-		cmd=`zapscan`
-		echo "${blob}" >> /etc/zaptel.conf
+		grep -v "\[general\]" ${FILENAME} | grep -v "\;" > ${ZAPCONF} 
+		;;
+	ztcfg)
 		ztcfg -vv 2> $ZTCFG_OUTPUT
 		;;
 esac




More information about the asterisk-gui-commits mailing list