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:
Chris Roberts 2016-10-04 17:31:42 -07:00 committed by GitHub
commit a384276431
1 changed files with 6 additions and 1 deletions

View File

@ -43,13 +43,18 @@ module VagrantPlugins
/sbin/ifdown '#{network[:device]}' || true
# Move new config into place
mv '#{remote_path}' '#{final_path}'
mv -f '#{remote_path}' '#{final_path}'
# Bring the interface up
ARPCHECK=no /sbin/ifup '#{network[:device]}'
EOH
end
commands << <<-EOH.gsub(/^ {14}/, '')
# Restart network
service network restart
EOH
comm.sudo(commands.join("\n"))
end
end