From: Tobias Brunner Date: Tue, 11 Aug 2009 09:12:17 +0000 (+0200) Subject: Copy contents of directory 'default' to all guests. X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=9c29cae7afde38580177541aceca4802f7c3b17c;p=thirdparty%2Fstrongswan.git Copy contents of directory 'default' to all guests. --- diff --git a/testing/config/default.yml b/testing/config/default.yml index 0e28ca9263..9f8814c038 100644 --- a/testing/config/default.yml +++ b/testing/config/default.yml @@ -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. diff --git a/testing/lib/guest_config.rb b/testing/lib/guest_config.rb index 6e2be97d26..add991cf99 100644 --- a/testing/lib/guest_config.rb +++ b/testing/lib/guest_config.rb @@ -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