do not set persistent state if firewall is disabled
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 15 Apr 2014 07:04:42 +0000 (09:04 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 15 Apr 2014 07:04:42 +0000 (09:04 +0200)
Else we have to manually restart the service after enable is set.

src/PVE/Firewall.pm

index ba0ddae..d5d4950 100644 (file)
@@ -2882,11 +2882,7 @@ sub update {
        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;
        }