mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
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 <nborisov@suse.com> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
This commit is contained in:
committed by
Eryu Guan
parent
25824c2703
commit
b9d1dcd135
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user