parent
1ef024984b
commit
6671cc6986
@ -41,10 +41,9 @@ module VagrantPlugins
|
||||
|
||||
commands << <<-EOH.gsub(/^ {14}/, '').rstrip
|
||||
# Configure #{network[:device]}
|
||||
mv '#{remote_path}' '/etc/netctl/#{network[:device]}' &&
|
||||
ip link set '#{network[:device]}' down &&
|
||||
netctl restart '#{network[:device]}' &&
|
||||
netctl enable '#{network[:device]}'
|
||||
chmod 0644 '#{remote_path}' &&
|
||||
mv '#{remote_path}' '/etc/systemd/network/#{network[:device]}.network' &&
|
||||
networkctl reload
|
||||
EOH
|
||||
end
|
||||
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
Description='A basic dhcp ethernet connection'
|
||||
Interface=<%= options[:device] %>
|
||||
Connection=ethernet
|
||||
IP=dhcp
|
||||
[Match]
|
||||
Name=<%= options[:device] %>
|
||||
|
||||
[Network]
|
||||
Description=A basic DHCP ethernet connection
|
||||
DHCP=ipv4
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
Connection=ethernet
|
||||
Description='A basic static ethernet connection'
|
||||
Interface=<%= options[:device] %>
|
||||
IP=static
|
||||
Address=('<%= options[:ip]%>/<%= options[:netmask] %>')
|
||||
[Match]
|
||||
Name=<%= options[:device] %>
|
||||
|
||||
[Network]
|
||||
Description=A basic static ethernet connection
|
||||
Address=<%= options[:ip]%>/<%= options[:netmask] %>
|
||||
<% if options[:gateway] -%>
|
||||
Gateway='<%= options[:gateway] %>'
|
||||
Gateway=<%= options[:gateway] %>
|
||||
<% end -%>
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
Connection=ethernet
|
||||
Description='A basic IPv6 ethernet connection'
|
||||
Interface=<%= options[:device] %>
|
||||
IP6=static
|
||||
Address6=('<%= options[:ip]%>/<%= options[:netmask] %>')
|
||||
[Match]
|
||||
Name=<%= options[:device] %>
|
||||
|
||||
[Network]
|
||||
Description=A basic static ethernet connection
|
||||
Address=<%= options[:ip]%>/<%= options[:netmask] %>
|
||||
<% if options[:gateway] -%>
|
||||
Gateway6='<%= options[:gateway] %>'
|
||||
Gateway=<%= options[:gateway] %>
|
||||
<% end -%>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user