Merge pull request #7751 from wakeful/fix-centos7-do-not-prompt-before-overwriting
Fix CentOS7 network config - do not prompt before overwriting
This commit is contained in:
commit
a384276431
|
@ -43,13 +43,18 @@ module VagrantPlugins
|
||||||
/sbin/ifdown '#{network[:device]}' || true
|
/sbin/ifdown '#{network[:device]}' || true
|
||||||
|
|
||||||
# Move new config into place
|
# Move new config into place
|
||||||
mv '#{remote_path}' '#{final_path}'
|
mv -f '#{remote_path}' '#{final_path}'
|
||||||
|
|
||||||
# Bring the interface up
|
# Bring the interface up
|
||||||
ARPCHECK=no /sbin/ifup '#{network[:device]}'
|
ARPCHECK=no /sbin/ifup '#{network[:device]}'
|
||||||
EOH
|
EOH
|
||||||
end
|
end
|
||||||
|
|
||||||
|
commands << <<-EOH.gsub(/^ {14}/, '')
|
||||||
|
# Restart network
|
||||||
|
service network restart
|
||||||
|
EOH
|
||||||
|
|
||||||
comm.sudo(commands.join("\n"))
|
comm.sudo(commands.join("\n"))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue