Touch RedHat network config to force it to exist [GH-381]
This commit is contained in:
parent
c9d03cf138
commit
f79084b1db
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
- Added DEVICE option to the RedHat host only networking entry, which allows
|
- Added DEVICE option to the RedHat host only networking entry, which allows
|
||||||
host only networking to work even if the VM has multiple NICs. [GH-382]
|
host only networking to work even if the VM has multiple NICs. [GH-382]
|
||||||
|
- Touch the network configuration file for RedHat so that the `sed` works
|
||||||
|
with host only networking. [GH-381]
|
||||||
|
|
||||||
## 0.7.5 (May 16, 2011)
|
## 0.7.5 (May 16, 2011)
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ module Vagrant
|
||||||
# interface file.
|
# interface file.
|
||||||
vm.ssh.execute do |ssh|
|
vm.ssh.execute do |ssh|
|
||||||
# Clear out any previous entries
|
# Clear out any previous entries
|
||||||
|
ssh.exec!("sudo touch /etc/sysconfig/network-scripts/ifcfg-eth#{net_options[:adapter]}")
|
||||||
ssh.exec!("sudo sed -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' /etc/sysconfig/network-scripts/ifcfg-eth#{net_options[:adapter]} > /tmp/vagrant-ifcfg-eth#{net_options[:adapter]}")
|
ssh.exec!("sudo sed -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' /etc/sysconfig/network-scripts/ifcfg-eth#{net_options[:adapter]} > /tmp/vagrant-ifcfg-eth#{net_options[:adapter]}")
|
||||||
ssh.exec!("sudo su -c 'cat /tmp/vagrant-ifcfg-eth#{net_options[:adapter]} > /etc/sysconfig/network-scripts/ifcfg-eth#{net_options[:adapter]}'")
|
ssh.exec!("sudo su -c 'cat /tmp/vagrant-ifcfg-eth#{net_options[:adapter]} > /etc/sysconfig/network-scripts/ifcfg-eth#{net_options[:adapter]}'")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue