mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-21 00:12:58 +02:00
initscripts fkt: Ignore comments in readhash
As '#Another Comment' is a valid key we test this change by checking if the comments do not end up as keys in our array. Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
59e3c2a217
commit
d289bc28be
@@ -905,6 +905,11 @@ readhash() {
|
||||
continue
|
||||
fi
|
||||
|
||||
# Skip Comments
|
||||
if [[ ${line} =~ ^#.*$ ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
local key="${line%=*}"
|
||||
local val="${line#*=}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user