Fix for uci_set_indexed_option() inserting multiple empty sections (#78)

This commit is contained in:
K3PGM 2021-03-14 21:35:10 -04:00 committed by GitHub
parent cdf8057f65
commit 1381cf3868
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -38,7 +38,7 @@
sub uci_get_sectiontype_count()
{
my ($config, $stype)=@_;
my $cmd=sprintf('uci show %s|egrep %s\.\@%s.*=%s|wc -l',$config,$stype,$stype,$stype);
my $cmd=sprintf('uci show %s|egrep %s\.\@%s.*=%s|wc -l',$config,$config,$stype,$stype);
my $res=`$cmd`;
my $rc=$?;
chomp($res);