Merge pull request #793 from bramton/conf2

config: Correctly match valueless parameters. Fixes #693
This commit is contained in:
Barry McCormick
2025-01-07 11:02:45 -08:00
committed by GitHub

View File

@@ -136,7 +136,7 @@ for _jail in ${JAILS}; do
awk -F= -v line="${LINE}" -v property="${PROPERTY}" '
BEGIN {
# build RE as string as we can not expand vars in RE literals
prop_re = "^[[:space:]]*" property "[[:space:]]*$";
prop_re = "^[[:space:]]*" property "[[:space:]]*;?$";
}
$1 ~ prop_re && !found {
# we already have an entry in the config for this property so