mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-22 08:52:58 +02:00
general-functions.pl: readhash() Add code to handle optional comments in files
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
@@ -149,6 +149,10 @@ sub readhash
|
||||
while (<FILE>)
|
||||
{
|
||||
chop;
|
||||
|
||||
# Skip comments.
|
||||
next if ($_ =~ /\#/);
|
||||
|
||||
($var, $val) = split /=/, $_, 2;
|
||||
if ($var)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user