From 9f5247f60cc66716de0b5b8bd14e0de118763fb5 Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Wed, 13 Dec 2017 14:53:51 +0100 Subject: [PATCH] general-functions.pl: readhash() Add code to handle optional comments in files Signed-off-by: Stefan Schantl --- config/cfgroot/general-functions.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/cfgroot/general-functions.pl b/config/cfgroot/general-functions.pl index 0577afe280..2191768c9c 100644 --- a/config/cfgroot/general-functions.pl +++ b/config/cfgroot/general-functions.pl @@ -149,6 +149,10 @@ sub readhash while () { chop; + + # Skip comments. + next if ($_ =~ /\#/); + ($var, $val) = split /=/, $_, 2; if ($var) { -- 2.39.5