my @args_cp = @ARGV;
exit 1 unless GetOptions(
- 'psad-path=s' => \$psadCmd,
- 'test-include=s' => \$test_include,
- 'include=s' => \$test_include, ### synonym
- 'test-exclude=s' => \$test_exclude,
- 'exclude=s' => \$test_exclude, ### synonym
- 'List-mode' => \$list_mode,
- 'diff' => \$diff_mode,
- 'firewall-type=s' => \$cmdline_fw_type,
- 'fw-type=s' => \$cmdline_fw_type, ### synonym
- 'help' => \$help
+ 'psad-path=s' => \$psadCmd,
+ 'test-include=s' => \$test_include,
+ 'include=s' => \$test_include, ### synonym
+ 'test-exclude=s' => \$test_exclude,
+ 'exclude=s' => \$test_exclude, ### synonym
- 'test-system-install' => \$test_system_install,
+ 'List-mode' => \$list_mode,
+ 'diff' => \$diff_mode,
++ 'test-system-install' => \$test_system_install,
++ 'firewall-type=s' => \$cmdline_fw_type,
++ 'fw-type=s' => \$cmdline_fw_type, ### synonym
+ 'help' => \$help
);
&usage() if $help;
+&set_fw_type();
+
- my $psad_def = "$psadCmd --test-mode --fw-type $fw_type";
+ if ($test_system_install) {
+ $normal_root_override_str = "-O $conf_dir/normal_root_override.conf";
+ $psadCmd = '/usr/sbin/psad';
+ }
+
++my $psad_def = "$psadCmd --test-mode --fw-type $fw_type $normal_root_override_str";
+
+my %test_keys = (
+ 'category' => $REQUIRED,
+ 'subcategory' => $OPTIONAL,
+ 'detail' => $REQUIRED,
+ 'function' => $REQUIRED,
+ 'cmdline' => $OPTIONAL,
+ 'fatal' => $OPTIONAL,
+ 'exec_err' => $OPTIONAL,
+ 'match_all' => $OPTIONAL,
+ 'firewalls' => $OPTIONAL,
+ 'postive_output_matches' => $OPTIONAL,
+ 'negative_output_matches' => $OPTIONAL,
+);
+
### define all tests
my @tests = (
{