my $cluster_conf = load_clusterfw_conf();
my $cluster_options = $cluster_conf->{options};
- my $enable = !(defined($cluster_options->{enable}) && ($cluster_options->{enable} == 0));
+ my $enable = $cluster_options->{enable};
my $status = read_pvefw_status();
die "Firewall is disabled - cannot start\n" if !$enable && $start;
if (!$enable) {
- if ($status ne 'stopped') {
- print "trying to stop firewall (firewall is disabled)\n" if $verbose;
- PVE::Firewall::remove_pvefw_chains();
- PVE::Firewall::save_pvefw_status('stopped');
- }
+ PVE::Firewall::remove_pvefw_chains();
print "Firewall disabled\n" if $verbose;
return;
}