[asterisk-commits] mnicholson: branch mnicholson/asttest r247250 - /team/mnicholson/asttest/astt...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Feb 17 12:41:45 CST 2010
Author: mnicholson
Date: Wed Feb 17 12:41:42 2010
New Revision: 247250
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=247250
Log:
Only generate configs if they do not already exist. This allows the configs to be generated then changed and not be overwritten.
Modified:
team/mnicholson/asttest/asttest/lua/astlib.lua
Modified: team/mnicholson/asttest/asttest/lua/astlib.lua
URL: http://svnview.digium.com/svn/asterisk/team/mnicholson/asttest/asttest/lua/astlib.lua?view=diff&rev=247250&r1=247249&r2=247250
==============================================================================
--- team/mnicholson/asttest/asttest/lua/astlib.lua (original)
+++ team/mnicholson/asttest/asttest/lua/astlib.lua Wed Feb 17 12:41:42 2010
@@ -115,6 +115,9 @@
--- Setup default asterisk.conf with our work area directories.
function asterisk:generate_asterisk_conf()
+ -- return if it exists already
+ if self.configs["asterisk.conf"] then return end
+
local c = self:new_config("asterisk.conf")
local s = c:new_section("directories")
s["astetcdir"] = self.work_area .. "/etc/asterisk"
@@ -140,6 +143,9 @@
--- Generate logger.conf with debug, messages, and full logs (disable console
-- log).
function asterisk:generate_logger_conf()
+ -- return if it exists already
+ if self.configs["logger.conf"] then return end
+
local c = self:new_config("logger.conf")
local s = c:new_section("general")
s = c:new_section("logfiles")
@@ -150,6 +156,9 @@
--- Generate manager.conf with a unique port.
function asterisk:generate_manager_conf()
+ -- return if it exists already
+ if self.configs["manager.conf"] then return end
+
local c = self:new_config("manager.conf")
local s = c:new_section("general")
s["enabled"] = "yes"
More information about the asterisk-commits
mailing list