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
|
||||
|
||||
# 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
|
||||
|
|
Loading…
Reference in New Issue