From: Nikolay Borisov Date: Thu, 25 Jun 2020 12:37:44 +0000 (+0300) Subject: common/config: Allow sections names to contain hyphen X-Git-Tag: v2022.05.01~715 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b9d1dcd13516bd04e7d629eaf09254c4d4b4df1f;p=xfstests-dev.git common/config: Allow sections names to contain hyphen Current regular expression in get_config_sections allows section names to consist of alphanumeric character and underscore. Extend it to also allow the hyphen '-' character. Signed-off-by: Nikolay Borisov Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/common/config b/common/config index e356bcda..1fe1e0e1 100644 --- a/common/config +++ b/common/config @@ -451,7 +451,7 @@ known_hosts() # in the section name otherwise the section will not be resognised. # Section name must be contained between square brackets. get_config_sections() { - sed -n -e "s/^\[\([[:alnum:]_]*\)\]/\1/p" < $1 + sed -n -e "s/^\[\([[:alnum:]_-]*\)\]/\1/p" < $1 } if [ ! -f "$HOST_OPTIONS" ]; then