elsif ($type eq "host" || $type eq "group") {
return &text("log_${action}_${type}", "<tt>$object</tt>");
}
+elsif ($action eq "openports") {
+ return &text('log_openports', join(" ", split(/\0/, $p->{'ports'})));
+ }
else {
return $text{"log_$action"};
}
if (@added) {
# Added some rules .. save them
&run_before_command();
- &unlock_file($iptables_save_file);
- &save_table($filter);
&lock_file($iptables_save_file);
+ &save_table($filter);
+ &unlock_file($iptables_save_file);
&run_after_command();
©_to_cluster();
print STDERR "Opened ports ",join(" ", @added),"\n";
print "Applied configuration successfully\n";
}
}
- &webmin_log("openports");
+ &webmin_log("openports", undef, undef, { 'ports' => \@added });
exit($ex);
}
else {
- print STDERR "Add ports are already open\n";
+ print STDERR "All ports are already open\n";
exit(0);
}