From c95832955e3349968c9973b2c14a45615186eb00 Mon Sep 17 00:00:00 2001 From: Andreas Guldstrand Date: Sat, 23 Jul 2016 00:00:23 +0200 Subject: sboconfig: allow comments and blank lines to be undisturbed --- sboconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sboconfig b/sboconfig index 819602d..0dbebb0 100755 --- a/sboconfig +++ b/sboconfig @@ -169,6 +169,9 @@ sub _fixup_conf { my @fixed; my %keys; foreach my $line (@lines) { + # if it's a comment or blank line, just pass it through + if ($line =~ /^(#|\s*$)/) { push @fixed, $line; next; } + my ($key, $val) = split /=/, $line; next if exists $keys{$key}; $keys{$key}++; -- cgit v1.2.3