diff options
author | Gaurav Sinha <gaurav.sinha@vyatta.com> | 2012-11-19 18:06:28 -0800 |
---|---|---|
committer | Gaurav Sinha <gaurav.sinha@vyatta.com> | 2012-11-20 10:26:24 -0800 |
commit | 207ee5b937bcb4cb5bcb4c6829bfad5d1d14fe77 (patch) | |
tree | 71eb37f8550c262b2323d70f22a9ef408b460585 | |
parent | f31ae89073067fd131eb25ba7cb1e3cad3dfea4f (diff) | |
download | vyatta-cfg-firewall-207ee5b937bcb4cb5bcb4c6829bfad5d1d14fe77.tar.gz vyatta-cfg-firewall-207ee5b937bcb4cb5bcb4c6829bfad5d1d14fe77.zip |
Fix rc usage as per ispet_delete and other commands
(cherry picked from commit caae72ccbf2c7f77c637cc51096546404ea8c837)
(cherry picked from commit 4f69c3181e60be9a7fa6f8d4e90f3eed080d84bd)
-rwxr-xr-x | lib/Vyatta/IpTables/IpSet.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Vyatta/IpTables/IpSet.pm b/lib/Vyatta/IpTables/IpSet.pm index 729c58e..e64a5ff 100755 --- a/lib/Vyatta/IpTables/IpSet.pm +++ b/lib/Vyatta/IpTables/IpSet.pm @@ -280,7 +280,9 @@ sub reset_ipset { } else { $self->reset_ipset_named(); } - $self->run_cmd($unlockcmd); + my $rc = $self->run_cmd($unlockcmd); + return "Error: call to ipset failed [$rc]" if $rc; + return; # undef } sub delete { |