Files
webmin/nftables/apply-boot.pl
Ilia Ross 0863d6ba7a
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
Revert #2700 reverted but only fix exact bug
This reverts commit 0d3e3d9473, reversing
changes made to 236c5cf489.
2026-05-12 18:01:16 +02:00

26 lines
545 B
Perl
Executable File

#!/usr/bin/perl
# apply-boot.pl
# Apply Webmin-managed nftables rules from the saved configuration
use strict;
use warnings;
no warnings 'redefine';
no warnings 'uninitialized';
our ($module_name, $no_acl_check);
$no_acl_check++;
if ($0 =~ /^(.*\/)[^\/]+$/) {
chdir($1);
}
require './nftables-lib.pl'; ## no critic (Modules::RequireBarewordIncludes)
if ($module_name ne 'nftables') {
print STDERR "Command must be run with full path\n";
exit(5);
}
my $err = apply_restore();
if ($err) {
print STDERR $err, "\n";
exit(1);
}
exit(0);