onenode.service in error when VM state file is not present

* scripts/onevm-all: truncate file only if it exists.

Ref: #20338
This commit is contained in:
Daniel Dehennin 2017-05-10 17:25:23 +02:00
parent e9ff4ad34c
commit e65f054237

View File

@ -221,7 +221,7 @@ begin
end
end
if options[:action] == "resume"
File.truncate(RUNVMFILE, 0)
File.truncate(RUNVMFILE, 0) if File.exists?(RUNVMFILE)
end
rescue Exception => e
puts e.message