Skip to content
This repository was archived by the owner on Nov 11, 2021. It is now read-only.

Commit 75cdd18

Browse files
authored
Merge pull request #278 from elmobp/master
Ubutnu/Debian route up/down fix
2 parents 8aa6fbe + 60df3b5 commit 75cdd18

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

templates/route_down-Debian.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
if [ "$IFACE" = "<%= @interface -%>" ] || [ "$IFACE" = "--all" ]; then
66
<%- (0..(@ipaddress.length-1)).each do |id| -%>
7-
if ip<%- if @family and @family[id] == 'inet6' -%> -6<%- end -%> route show <%- if @table and @table[id] -%> table <%= @table[id] %><% end %> | grep -qF "<%= @ipaddress[id] %><%- if @_cidr and @_cidr[id] and @_cidr[id] != 32 -%>/<%= @_cidr[id] %><%- end -%> "
7+
if ip<%- if @family and @family[id] == 'inet6' -%> -6<%- end -%> route show <%- if @table and @table[id] -%> table <%= @table[id] %><% end %> | grep -qP "<%= @ipaddress[id] %><%- if @_cidr and @_cidr[id] and @_cidr[id] != 32 -%>/<%= @_cidr[id] %><%- if @ipaddress[id] == '0.0.0.0' and @_cidr[id] == 0 %>|default<%- end %><%- end -%> "
88
then
99
ip<%- if @family and @family[id] == 'inet6' -%> -6<%- end -%> route del <%= @ipaddress[id] %>/<%= @_cidr[id] %><%- if @gateway and @gateway[id] -%> via <%= @gateway[id] %><%- end -%> dev <%= @interface %> <%- if @scope and @scope[id] -%> scope <%= @scope[id] %><%- end -%><%- if @source and @source[id] -%> src <%= @source[id] %><%- end -%><%- if @table and @table[id] -%> table <%= @table[id] %><% end %><%- if @metric and @metric[id] -%> metric <%= @metric[id] %><% end %><%- if @mtu and @mtu[id] -%> mtu <%= @mtu[id] %><% end %>
1010
fi

templates/route_up-Debian.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
if [ "$IFACE" = "<%= @interface -%>" ] || [ "$IFACE" = "--all" ]; then
66
<%- (0..(@ipaddress.length-1)).each do |id| -%>
7-
if ! ip<%- if @family and @family[id] == 'inet6' -%> -6<%- end -%> route show <%- if @table and @table[id] -%> table <%= @table[id] %><% end %> | grep -qF "<%= @ipaddress[id] %><%- if @_cidr and @_cidr[id] and @_cidr[id] != 32 -%>/<%= @_cidr[id] %><%- end -%> "
7+
if ! ip<%- if @family and @family[id] == 'inet6' -%> -6<%- end -%> route show <%- if @table and @table[id] -%> table <%= @table[id] %><% end %> | grep -qP "<%= @ipaddress[id] %><%- if @_cidr and @_cidr[id] and @_cidr[id] != 32 -%>/<%= @_cidr[id] %><%- if @ipaddress[id] == '0.0.0.0' and @_cidr[id] == 0 %>|default<%- end %><%- end -%> "
88
then
99
ip<%- if @family and @family[id] == 'inet6' -%> -6<%- end -%> route add <%= @ipaddress[id] %>/<%= @_cidr[id] %><%- if @gateway and @gateway[id] -%> via <%= @gateway[id] %><%- end -%> dev <%= @interface %> <%- if @scope and @scope[id] -%> scope <%= @scope[id] %><%- end -%><%- if @source and @source[id] -%> src <%= @source[id] %><%- end -%><%- if @table and @table[id] -%> table <%= @table[id] %><% end %><%- if @metric and @metric[id] -%> metric <%= @metric[id] %><% end %><%- if @mtu and @mtu[id] -%> mtu <%= @mtu[id] %><% end %>
1010
fi

0 commit comments

Comments
 (0)