guests/redhat: force remove files so it works with pty

This commit is contained in:
Mitchell Hashimoto 2014-03-05 16:22:55 -08:00
parent 6fefef7538
commit cae4a1c554
1 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ module VagrantPlugins
machine.communicate.sudo("touch #{network_scripts_dir}/ifcfg-eth#{network[:interface]}") machine.communicate.sudo("touch #{network_scripts_dir}/ifcfg-eth#{network[:interface]}")
machine.communicate.sudo("sed -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' #{network_scripts_dir}/ifcfg-eth#{network[:interface]} > /tmp/vagrant-ifcfg-eth#{network[:interface]}") machine.communicate.sudo("sed -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' #{network_scripts_dir}/ifcfg-eth#{network[:interface]} > /tmp/vagrant-ifcfg-eth#{network[:interface]}")
machine.communicate.sudo("cat /tmp/vagrant-ifcfg-eth#{network[:interface]} > #{network_scripts_dir}/ifcfg-eth#{network[:interface]}") machine.communicate.sudo("cat /tmp/vagrant-ifcfg-eth#{network[:interface]} > #{network_scripts_dir}/ifcfg-eth#{network[:interface]}")
machine.communicate.sudo("rm /tmp/vagrant-ifcfg-eth#{network[:interface]}") machine.communicate.sudo("rm -f /tmp/vagrant-ifcfg-eth#{network[:interface]}")
# Render and upload the network entry file to a deterministic # Render and upload the network entry file to a deterministic
# temporary location. # temporary location.
@ -61,7 +61,7 @@ module VagrantPlugins
machine.communicate.sudo("ARPCHECK=no /sbin/ifup eth#{interface} 2> /dev/null") machine.communicate.sudo("ARPCHECK=no /sbin/ifup eth#{interface} 2> /dev/null")
end end
machine.communicate.sudo("rm /tmp/vagrant-network-entry_#{interface}") machine.communicate.sudo("rm -f /tmp/vagrant-network-entry_#{interface}")
end end
end end
end end