Initial version of network module.
This commit is contained in:
parent
56ee9b1bd6
commit
02fa10f33c
5 changed files with 407 additions and 0 deletions
6
network/templates/hostname.if.erb
Normal file
6
network/templates/hostname.if.erb
Normal file
|
@ -0,0 +1,6 @@
|
|||
<% if proto == 'dhcp' -%>
|
||||
dhcp NONE NONE NONE<% options.each do |val| -%> <%= val -%><% end -%>
|
||||
<% else -%>
|
||||
inet <%= ipaddr -%> <%= netmask -%> NONE<% options.each do |val| -%> <%= val -%><% end -%>
|
||||
<% end -%>
|
||||
|
3
network/templates/hostname.pppoe.erb
Normal file
3
network/templates/hostname.pppoe.erb
Normal file
|
@ -0,0 +1,3 @@
|
|||
inet 0.0.0.0 255.255.255.255 NONE pppoedev <%= device -%> authproto <%= authtype -%> authname '<%= username -%>' authkey '<%= password %>' up
|
||||
dest 0.0.0.1
|
||||
!/sbin/route add default -ifp pppoe0 0.0.0.1
|
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 -%>
|
14
network/templates/vip.conf.erb
Normal file
14
network/templates/vip.conf.erb
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Virtual IP configuration file for UCARP
|
||||
# The number (from 001 to 255) in the name of the file is the identifier
|
||||
|
||||
# In the simple scenario, you want a single virtual IP address from the _same_
|
||||
# network to be taken over by one of the routers.
|
||||
VIP_ADDRESS="<%= ipaddr -%>"
|
||||
SOURCE_ADDRESS="<%= ipaddress %>"
|
||||
|
||||
# In more complex scenarios, check the "vip-common" file for values to override
|
||||
# and how to add options.
|
||||
PASSWORD="<%= password -%>"
|
||||
|
||||
# Extra options.
|
||||
OPTIONS="<% options.each do |val| -%> <%= val %><% end -%>"
|
Loading…
Add table
Add a link
Reference in a new issue