]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Copy contents of directory 'default' to all guests.
authorTobias Brunner <tobias@strongswan.org>
Tue, 11 Aug 2009 09:12:17 +0000 (11:12 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 15 Sep 2009 12:32:29 +0000 (14:32 +0200)
testing/config/default.yml
testing/lib/guest_config.rb

index 0e28ca9263757cbefbda1d811de0f7bff32eaac3..9f8814c038b862fbfcec7f85efeb24417fda5d7f 100644 (file)
@@ -34,7 +34,8 @@
 # | |-master - the master file system to be used (folder or tarball)
 # | |-templates - default config files etc. that are copied to the guests root
 # | |             file system. a directory with the guest's name must exist in
-# | |             the directory specified here.
+# | |             the directory specified here. the contents of a subdirectory
+# | |             named 'default' are copied to all guests.
 # | |-mem - the memory in MB per guest
 # | |-console - a list of consoles to be connected for the guests (xterm|pts).
 # |             e.g.
index 6e2be97d26ffe8064e1ffad476b180ed9335ee8f..add991cf993d3d971a9b8f5a1dd858b6cd9ac6f7 100644 (file)
@@ -65,10 +65,12 @@ module Dumm
       @root = File.join(Testing.guests_dir, name, 'diff')
 
       if @templates
-        tmpl = File.join(@templates, name)
-        if File.directory?(tmpl)
-          # '/.' is required to copy the contents of tmpl and not tmpl itself
-          FileUtils.cp_r(tmpl + '/.', @root)
+        ['default', name].each do |dir|
+          tmpl = File.join(@templates, dir)
+          if File.directory?(tmpl)
+            # '/.' is required to copy the contents of tmpl and not tmpl itself
+            FileUtils.cp_r(tmpl + '/.', @root)
+          end
         end
       end