-sub save_pvefw_status {
- my ($status) = @_;
-
- die "unknown status '$status' - internal error"
- if $status !~ m/^(stopped|active)$/;
-
- mkdir dirname($pve_fw_status_filename);
- PVE::Tools::file_set_contents($pve_fw_status_filename, $status);
-}
-
-sub read_pvefw_status {
-
- my $status = 'unknown';
-
- return 'stopped' if ! -f $pve_fw_status_filename;
-
- eval {
- $status = PVE::Tools::file_get_contents($pve_fw_status_filename);
- };
- warn $@ if $@;
-
- return $status;
-}
-