address puppet 3.x deprecation warnings

This commit is contained in:
mh 2014-04-18 11:09:58 +02:00
parent 902429773e
commit 12814b8e9d
4 changed files with 17 additions and 17 deletions

View file

@ -1,6 +1,6 @@
Address = <%= scope.lookupvar("::ipaddress_#{tinc_interface.gsub('.','_')}") %>
Port = <%= port %>
Compression = <%= compression %> # 0=no,11=best lzo
Port = <%= @port %>
Compression = <%= @compression %> # 0=no,11=best lzo
#
<%= tinc_keys[1] %>
<%= @tinc_keys[1] %>

View file

@ -1,4 +1,4 @@
#!/bin/sh
brctl delif <%= real_tinc_bridge_interface %> $INTERFACE
brctl delif <%= @real_tinc_bridge_interface %> $INTERFACE

View file

@ -1,17 +1,17 @@
#!/bin/sh
grep <%= real_tinc_bridge_interface %> /proc/net/dev | awk -F: '{ print $1 }' | grep -q <%= real_tinc_bridge_interface %>
grep <%= @real_tinc_bridge_interface %> /proc/net/dev | awk -F: '{ print $1 }' | grep -q <%= @real_tinc_bridge_interface %>
if [ $? -gt 0 ]; then
brctl addbr <%= real_tinc_bridge_interface %>
ifconfig <%= tinc_internal_interface %> 0.0.0.0
ifconfig <%= real_tinc_bridge_interface %> <%= real_tinc_internal_ip %> netmask 255.255.255.0
brctl addif <%= real_tinc_bridge_interface %> <%= tinc_internal_interface %>
ifconfig <%= tinc_internal_interface %> up
brctl addbr <%= @real_tinc_bridge_interface %>
ifconfig <%= @tinc_internal_interface %> 0.0.0.0
ifconfig <%= @real_tinc_bridge_interface %> <%= @real_tinc_internal_ip %> netmask 255.255.255.0
brctl addif <%= @real_tinc_bridge_interface %> <%= @tinc_internal_interface %>
ifconfig <%= @tinc_internal_interface %> up
fi
ifconfig $INTERFACE 0.0.0.0
brctl addif <%= real_tinc_bridge_interface %> $INTERFACE
brctl addif <%= @real_tinc_bridge_interface %> $INTERFACE
ifconfig $INTERFACE up
<% if override_mtu -%>
ifconfig $INTERFACE mtu <%= override_mtu.to_i %>
<% if @override_mtu -%>
ifconfig $INTERFACE mtu <%= @override_mtu.to_i %>
<% end -%>

View file

@ -1,12 +1,12 @@
Name = <%= fqdn_tinc %>
Name = <%= @fqdn_tinc %>
AddressFamily = ipv4
Device = /dev/net/tun
#PMTU = 1440
Mode = switch
#Mode = router
BindToInterface = <%= tinc_interface.to_s %>
BindToInterface = <%= @tinc_interface.to_s %>
<% tinc_hosts.to_a.reject{|h| h.to_s == scope.lookupvar('::fqdn') }.each do |connect_to_host| -%>
<% Array(@tinc_hosts).reject{|h| h.to_s == scope.lookupvar('::fqdn') }.each do |connect_to_host| -%>
ConnectTo = <%= connect_to_host %>
<% end -%>
<% end -%>