general-functions.pl: Only skip lines with a # at thebeginning

Message ID 20190218102813.29248-1-michael.tremer@ipfire.org
State Accepted
Commit 06f57f72309f268d4f6b3490b33912813fbf1f1e
Headers
Series general-functions.pl: Only skip lines with a # at thebeginning |

Commit Message

Michael Tremer Feb. 18, 2019, 9:28 p.m. UTC
  This accidientially dropped all lines that include #. That resulted
in colour codes not being loaded from file any more.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
---
 config/cfgroot/general-functions.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Stefan Schantl Feb. 18, 2019, 9:38 p.m. UTC | #1
Hello Michael,

thanks for the patch and figuring out why the graphs are not displayed
anymore - merged!

Best regards,

-Stefan
> This accidientially dropped all lines that include #. That resulted
> in colour codes not being loaded from file any more.
> 
> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
> ---
>  config/cfgroot/general-functions.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/config/cfgroot/general-functions.pl
> b/config/cfgroot/general-functions.pl
> index 2d3eb73d7..04e36969c 100644
> --- a/config/cfgroot/general-functions.pl
> +++ b/config/cfgroot/general-functions.pl
> @@ -151,7 +151,7 @@ sub readhash
>  		chop;
>  
>  		# Skip comments.
> -		next if ($_ =~ /\#/);
> +		next if ($_ =~ /^#/);
>  
>  		($var, $val) = split /=/, $_, 2;
>  		if ($var)
  

Patch

diff --git a/config/cfgroot/general-functions.pl b/config/cfgroot/general-functions.pl
index 2d3eb73d7..04e36969c 100644
--- a/config/cfgroot/general-functions.pl
+++ b/config/cfgroot/general-functions.pl
@@ -151,7 +151,7 @@  sub readhash
 		chop;
 
 		# Skip comments.
-		next if ($_ =~ /\#/);
+		next if ($_ =~ /^#/);
 
 		($var, $val) = split /=/, $_, 2;
 		if ($var)