Signed-off-by: Bai Jing 799286817@qq.com --- container/conserver/generate_conserver.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/container/conserver/generate_conserver.rb b/container/conserver/generate_conserver.rb index 4e923c2..8914247 100755 --- a/container/conserver/generate_conserver.rb +++ b/container/conserver/generate_conserver.rb @@ -12,9 +12,12 @@ def generate_conserver(lab) return unless File.exist?('conserver-head.cf')
FileUtils.cp('conserver-head.cf', 'conserver.cf') - + host_dir = "#{CCI_REPOS}/lab-#{lab}/hosts/" - return unless Dir.exist?(host_dir) + unless Dir.exist?(host_dir) do + puts "please check whether the #{host_dir} directory exists " + return + end
Dir.each_child(host_dir) do |host| ipmi_ip = YAML.load_file("#{host_dir}#{host}")['ipmi_ip']