# File lib/genome-lib/virsh.rb, line 89 def autostart_disable(opts={}) name = opts[:domname].nil? ? get_name(opts[:uuid]) : opts[:domname] # popen3 doesn't capture the exist status because of the way it spawns # the child process IO.popen("virsh autostart --disable #{name} 2>&1") do |io| yield(io) if block_given? end if $?.exitstatus != 0 # We're probably running Xen. if File.exist?("/etc/xen") FileUtils.rm_rf("/etc/xen/auto/#{name}") # in case this machine already existed end end end