Rename function and adjust comment (#2306)

This commit is contained in:
Casper 2021-11-28 17:02:07 +01:00 committed by GitHub
parent babae05d4a
commit a8a39a0a1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -316,8 +316,8 @@ function _obtain_hostname_and_domainname
DOMAINNAME="${DOMAINNAME:-${HOSTNAME}}"
}
# Remove string input with empty line, only whitespace or `#` as the first non-whitespace character.
function _strip_comments
# Check if string input is an empty line, only whitespaces or `#` as the first non-whitespace character.
function _is_comment
{
grep -q -E "^\s*$|^\s*#" <<< "${1}"
}

View File

@ -28,7 +28,7 @@ function _relayhost_sasl
# add domain-specific auth from config file:
while read -r LINE
do
if ! _strip_comments "${LINE}"
if ! _is_comment "${LINE}"
then
echo "${LINE}" >> /etc/postfix/sasl_passwd
fi