pari: branch aadk r593 - /branches/aadk/config/networking.html

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Tue Apr 3 15:22:01 MST 2007


Author: pari
Date: Tue Apr  3 17:22:00 2007
New Revision: 593

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=593
Log:
discarding brandon's 591 and overwriting

Modified:
    branches/aadk/config/networking.html

Modified: branches/aadk/config/networking.html
URL: http://svn.digium.com/view/asterisk-gui/branches/aadk/config/networking.html?view=diff&rev=593&r1=592&r2=593
==============================================================================
--- branches/aadk/config/networking.html (original)
+++ branches/aadk/config/networking.html Tue Apr  3 17:22:00 2007
@@ -44,19 +44,29 @@
 
 	networkingcallbacks.savechanges = function(){
 
-		var param_file = "/etc/asterisk/scripts/network.params";
-		var network_script = "/etc/asterisk/scripts/networking.sh";
-		parent.astmanEngine.run_tool("echo \"DHCP_WAN=" + _$('DHCP_WAN').value + " IP_WAN=" + _$('IP_WAN').value + " SUBNET_WAN=" + _$('SUBNET_WAN').value + " GATEWAY_WAN=" + _$('GATEWAY_WAN').value + " DNS_WAN=" + _$('DNS_WAN').value + "\" > " + param_file); 
-
-		parent.astmanEngine.run_tool("echo \" DHCP_LAN=" + _$('DHCP_LAN').value + " IP_LAN=" + _$('IP_LAN').value + " SUBNET_LAN=" + _$('SUBNET_LAN').value + " GATEWAY_LAN=" + _$('GATEWAY_LAN').value + " DNS_LAN=" + _$('DNS_LAN').value + "\" >> " + param_file); 
-
-		parent.astmanEngine.run_tool("echo \" DNS_LAN=" + _$('DNS_LAN').value + " START_RANGE_LAN=" + _$('START_RANGE_LAN').value + " END_RANGE_LAN=" + _$('END_RANGE_LAN').value + " SSH_STATUS=" + _$('SSH_STATUS').value + "\" >> " + param_file); 
-
-		parent.astmanEngine.run_tool("echo \" HOSTNAME=" + _$('HOSTNAME').value + " LEASE_LAN=" + _$('LEASE_LAN').value + " NTP_LAN=" + _$('NTP_LAN').value + " TFTP_LAN=" + _$('TFTP_LAN').value + " DOMAIN_LAN=" + _$('DOMAIN_LAN').value + " MAX_LEASE=" + _$('MAX_LEASE') + "\" >> " + param_file); 
-
-		parent.astmanEngine.run_tool("sh " + network_script + " " + param_file); 
-
-		/* The bash script will take the first argument and 'include' it with the period(.) */
+		var cmd1 = "echo \"DHCP_WAN=" + _$('DHCP_WAN').value + " IP_WAN=" + _$('IP_WAN').value + " SUBNET_WAN=" + _$('SUBNET_WAN').value + " GATEWAY_WAN=" + _$('GATEWAY_WAN').value + " DNS_WAN=" + _$('DNS_WAN').value + "\" > /var/lib/asterisk/static-http/config/network.params";
+
+		var cmd2 = "echo \" DHCP_LAN=" + _$('DHCP_LAN').value + " IP_LAN=" + _$('IP_LAN').value + " SUBNET_LAN=" + _$('SUBNET_LAN').value + " GATEWAY_LAN=" + _$('GATEWAY_LAN').value + " DNS_LAN=" + _$('DNS_LAN').value + "\" >> /var/lib/asterisk/static-http/config/network.params";
+
+		var cmd3 = "echo \" DNS_LAN=" + _$('DNS_LAN').value + " START_RANGE_LAN=" + _$('START_RANGE_LAN').value + " END_RANGE_LAN=" + _$('END_RANGE_LAN').value + " SSH_STATUS=" + _$('SSH_STATUS').value + "\" >> /var/lib/asterisk/static-http/config/network.params";
+
+		var cmd4 = "echo \" HOSTNAME=" + _$('HOSTNAME').value + " LEASE_LAN=" + _$('LEASE_LAN').value + " NTP_LAN=" + _$('NTP_LAN').value + " TFTP_LAN=" + _$('TFTP_LAN').value + " DOMAIN_LAN=" + _$('DOMAIN_LAN').value + " MAX_LEASE=" + _$('MAX_LEASE') + "\" >> /var/lib/asterisk/static-http/config/network.params";
+
+		var cmd5 = asterisk_guiNetworkSettings;
+
+		parent.astmanEngine.run_tool(cmd1,onSuccess = function() {
+			parent.astmanEngine.run_tool(cmd2,onSuccess = function() {
+				parent.astmanEngine.run_tool(cmd3,onSuccess = function() {
+					parent.astmanEngine.run_tool(cmd4,onSuccess = function() {
+						parent.astmanEngine.run_tool(cmd5,onSuccess = function() { });
+					});
+				});
+			});
+		});
+
+		/* Now networking.sh includes the network.params file
+		   All the variables are now accessible through $name  */
+
 	}
 
 



More information about the asterisk-gui-commits mailing list