From 48078357a3fa0fe925660c21d7bd3c87914f0a6b Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 15 Apr 2023 18:24:21 -0700 Subject: [PATCH] Add formal params --- postfix/postfix-lib.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/postfix/postfix-lib.pl b/postfix/postfix-lib.pl index 62a351e60..96416f089 100755 --- a/postfix/postfix-lib.pl +++ b/postfix/postfix-lib.pl @@ -100,8 +100,10 @@ sub is_existing_parameter ## modified to allow main_parameter:subparameter sub get_current_value { +my ($n, $nodef) = @_; + # First try to get the value from main.cf directly -my ($name,$key)=split /:/,$_[0]; +my ($name, $key) = split(/:/, $n); my $lref = &read_file_lines($config{'postfix_config_file'}); my $out; my ($begin_flag, $end_flag); @@ -127,7 +129,7 @@ foreach my $l (@$lref) { last; } } -if (!defined($out) && !$_[1]) { +if (!defined($out) && !$nodef) { # Fall back to asking Postfix # -h tells postconf not to output the name of the parameter my $err;