Initial version of network module.
This commit is contained in:
parent
56ee9b1bd6
commit
02fa10f33c
5 changed files with 407 additions and 0 deletions
23
network/templates/ifcfg-if.erb
Normal file
23
network/templates/ifcfg-if.erb
Normal file
|
@ -0,0 +1,23 @@
|
|||
DEVICE=<%= name %>
|
||||
<% if name !~ /bond[0-9]/ && has_variable?("macaddress_" + name) -%>
|
||||
HWADDR=<%= scope.lookupvar("macaddress_" + name) %>
|
||||
<% end -%>
|
||||
ONBOOT=yes
|
||||
BOOTPROTO=<%= proto %>
|
||||
<% if proto == 'none' -%>
|
||||
IPV6INIT=no
|
||||
<% end -%>
|
||||
<% if ipaddr != 'none' -%>
|
||||
IPADDR=<%= ipaddr %>
|
||||
<% end -%>
|
||||
<% if netmask != 'none' -%>
|
||||
NETMASK=<%= netmask %>
|
||||
<% end -%>
|
||||
<% if proto == 'dhcp' -%>
|
||||
DHCPCLASS=
|
||||
PERSISTENT_DHCLIENT=yes
|
||||
NOZEROCONF=yes
|
||||
<% end -%>
|
||||
<% options.each do |val| -%>
|
||||
<%= val %>
|
||||
<% end -%>
|
Loading…
Add table
Add a link
Reference in a new issue