mirror of https://github.com/aredn/aredn.git
bugfix: uci options are single-quoted in CC
fixes AREDN->ticket:203 Change-Id: Ia94e3154d618c2baa7122166bfc3756c762d31c6
This commit is contained in:
parent
50332f76d2
commit
8d137bbfa3
|
@ -79,7 +79,6 @@ sub uci_get_names_by_sectiontype()
|
||||||
@parts=();
|
@parts=();
|
||||||
chomp($lines[$l]);
|
chomp($lines[$l]);
|
||||||
@parts = $lines[$l] =~ /^$config\.(.*)\=$stype/g;1;
|
@parts = $lines[$l] =~ /^$config\.(.*)\=$stype/g;1;
|
||||||
|
|
||||||
if (scalar(@parts) eq 1) {
|
if (scalar(@parts) eq 1) {
|
||||||
push(@names,$parts[0]);
|
push(@names,$parts[0]);
|
||||||
}
|
}
|
||||||
|
@ -103,8 +102,8 @@ sub uci_get_named_section()
|
||||||
chomp($l);
|
chomp($l);
|
||||||
# @parts=();
|
# @parts=();
|
||||||
@parts = $l =~ /^$config\.$sname\.(.*)\=(.*)/g;1;
|
@parts = $l =~ /^$config\.$sname\.(.*)\=(.*)/g;1;
|
||||||
|
|
||||||
if (scalar(@parts) eq 2) {
|
if (scalar(@parts) eq 2) {
|
||||||
|
$parts[1] =~ s/^\'|\'+$//g;
|
||||||
$section->{$parts[0]} = $parts[1];
|
$section->{$parts[0]} = $parts[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -112,7 +111,6 @@ sub uci_get_named_section()
|
||||||
return $section;
|
return $section;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# RETURNS an array of hashes
|
# RETURNS an array of hashes
|
||||||
sub uci_get_all_indexed_by_sectiontype()
|
sub uci_get_all_indexed_by_sectiontype()
|
||||||
{
|
{
|
||||||
|
@ -136,6 +134,7 @@ sub uci_get_all_indexed_by_sectiontype()
|
||||||
$sect={};
|
$sect={};
|
||||||
$lastindex=$parts[0];
|
$lastindex=$parts[0];
|
||||||
}
|
}
|
||||||
|
$parts[2] =~ s/^\'|\'+$//g;
|
||||||
$sect->{$parts[1]} = $parts[2];
|
$sect->{$parts[1]} = $parts[2];
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue