bugfix: uci options are single-quoted in CC

fixes AREDN->ticket:203

Change-Id: Ia94e3154d618c2baa7122166bfc3756c762d31c6
This commit is contained in:
Darryl Quinn 2016-11-21 20:15:08 -06:00 committed by K5DLQ
parent 50332f76d2
commit 8d137bbfa3
1 changed files with 4 additions and 5 deletions

View File

@ -79,10 +79,9 @@ sub uci_get_names_by_sectiontype()
@parts=();
chomp($lines[$l]);
@parts = $lines[$l] =~ /^$config\.(.*)\=$stype/g;1;
if (scalar(@parts) eq 1) {
push(@names,$parts[0]);
}
}
}
}
return @names;
@ -103,16 +102,15 @@ sub uci_get_named_section()
chomp($l);
# @parts=();
@parts = $l =~ /^$config\.$sname\.(.*)\=(.*)/g;1;
if (scalar(@parts) eq 2) {
$parts[1] =~ s/^\'|\'+$//g;
$section->{$parts[0]} = $parts[1];
}
}
}
}
return $section;
}
# RETURNS an array of hashes
sub uci_get_all_indexed_by_sectiontype()
{
@ -136,6 +134,7 @@ sub uci_get_all_indexed_by_sectiontype()
$sect={};
$lastindex=$parts[0];
}
$parts[2] =~ s/^\'|\'+$//g;
$sect->{$parts[1]} = $parts[2];
next;
}