1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

regex match from the beginning to the end of the string in nic_deactivate

This commit is contained in:
Marcel Weinberg 2016-10-26 19:49:25 +02:00
parent 7df7f4ff73
commit 4d3f6b2e47

View File

@ -328,7 +328,7 @@ module SGIPTables
remove_chains = []
iptables_s.lines.each do |line|
if line.match(/^-N #{chain}/)
if line.match(/^-N #{chain}$/)
remove_chains << line.split[1]
end
end
@ -336,7 +336,7 @@ module SGIPTables
remove_chains.each {|c| commands.add :iptables, "-X #{c}" }
ipset_list.lines.each do |line|
if line.match(/^#{chain}/)
if line.match(/^#{chain}$/)
set = line.strip
commands.add :ipset, "destroy #{set}"
end