From: Dietmar Maurer Date: Mon, 19 May 2014 09:10:58 +0000 (+0200) Subject: add init function X-Git-Url: https://git.proxmox.com/?p=pve-firewall.git;a=commitdiff_plain;h=8b453a09f302dd91db5c02c92da144df37503d79 add init function --- diff --git a/src/PVE/Firewall.pm b/src/PVE/Firewall.pm index 73005ab..667c876 100644 --- a/src/PVE/Firewall.pm +++ b/src/PVE/Firewall.pm @@ -2928,6 +2928,16 @@ sub remove_pvefw_chains { iptables_restore_cmdlist($cmdlist); } +sub init { + my $cluster_conf = load_clusterfw_conf(); + my $cluster_options = $cluster_conf->{options}; + my $enable = $cluster_options->{enable}; + + return if !$enable; + + # load required modules here +} + sub update { my ($verbose) = @_; @@ -2956,5 +2966,4 @@ sub update { run_locked($code); } - 1; diff --git a/src/pve-firewall b/src/pve-firewall index 875a753..0c92979 100755 --- a/src/pve-firewall +++ b/src/pve-firewall @@ -114,6 +114,10 @@ sub run_server { delete $ENV{RESTART_PVE_FIREWALL}; + PVE::Cluster::cfs_update(); + + PVE::Firewall::init(); + if (!$param->{debug}) { open STDIN, '/dev/null' || die "can't write /dev/null";