bkruse: trunk r1648 - /trunk/scripts/editzap.sh

SVN commits to the Asterisk-GUI project asterisk-gui-commits at lists.digium.com
Sat Oct 6 18:58:39 CDT 2007


Author: bkruse
Date: Sat Oct  6 18:58:38 2007
New Revision: 1648

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=1648
Log:
take the file written from the gui, write it to /etc/zaptel.conf and apply the settings.

Modified:
    trunk/scripts/editzap.sh

Modified: trunk/scripts/editzap.sh
URL: http://svn.digium.com/view/asterisk-gui/trunk/scripts/editzap.sh?view=diff&rev=1648&r1=1647&r2=1648
==============================================================================
--- trunk/scripts/editzap.sh (original)
+++ trunk/scripts/editzap.sh Sat Oct  6 18:58:38 2007
@@ -11,7 +11,7 @@
 
 # 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")
+	error_out "Sed not installed, needed to reload modules, you can do it manually by forcing the modules in via t1e1override"
 fi
 
 case ${1} in
@@ -28,17 +28,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
-		ztcfg -vv 2> $ZTCFG_OUTPUT
+		FILENAME="/etc/asterisk/applyzap.conf"
+		grep -v "\[general\]" ${FILENAME} > ${ZAPCONF} 
+		ztcfg -vv > $ZTCFG_OUTPUT
 		;;
 esac
 




More information about the asterisk-gui-commits mailing list