diff options
author | varac <varacanero@zeromail.org> | 2013-10-15 23:23:19 +0200 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2013-10-15 23:23:19 +0200 |
commit | d4ba280889651c16ffe99e3e2136a02665240e70 (patch) | |
tree | c200e15b77e0a445c81473a2c28763051b7429db /puppet/modules/site_openvpn/templates | |
parent | befbc71fa2af217ff89facd8e10794b60f19f66e (diff) | |
parent | 071bd544ed79a07bb2532b7e79318e76062ba49e (diff) |
Merge branch 'feature/1863_puppet_-_openvpn_gateway_netmask' into develop
Diffstat (limited to 'puppet/modules/site_openvpn/templates')
-rw-r--r-- | puppet/modules/site_openvpn/templates/add_gateway_ips.sh.erb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/puppet/modules/site_openvpn/templates/add_gateway_ips.sh.erb b/puppet/modules/site_openvpn/templates/add_gateway_ips.sh.erb index 05f3d16b..e76b756b 100644 --- a/puppet/modules/site_openvpn/templates/add_gateway_ips.sh.erb +++ b/puppet/modules/site_openvpn/templates/add_gateway_ips.sh.erb @@ -1,11 +1,11 @@ #!/bin/sh -ip addr show dev <%= scope.lookupvar('site_config::params::interface') %> | grep -q <%= @openvpn_gateway_address %>/24 || - ip addr add <%= @openvpn_gateway_address %>/24 dev <%= scope.lookupvar('site_config::params::interface') %> +ip addr show dev <%= scope.lookupvar('site_config::params::interface') %> | grep -q <%= @openvpn_gateway_address %>/<%= @primary_netmask %> || + ip addr add <%= @openvpn_gateway_address %>/<%= @primary_netmask %> dev <%= scope.lookupvar('site_config::params::interface') %> <% if @openvpn_second_gateway_address %> -ip addr show dev <%= scope.lookupvar('site_config::params::interface') %> | grep -q <%= @openvpn_second_gateway_address %>/24 || - ip addr add <%= @openvpn_second_gateway_address %>/24 dev <%= scope.lookupvar('site_config::params::interface') %> +ip addr show dev <%= scope.lookupvar('site_config::params::interface') %> | grep -q <%= @openvpn_second_gateway_address %>/<%= @primary_netmask %> || + ip addr add <%= @openvpn_second_gateway_address %>/<%= @primary_netmask %> dev <%= scope.lookupvar('site_config::params::interface') %> <% end %> /bin/echo 1 > /proc/sys/net/ipv4/ip_forward |