diff options
Diffstat (limited to 'scripts/VyattaConfig.pm')
-rw-r--r-- | scripts/VyattaConfig.pm | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/VyattaConfig.pm b/scripts/VyattaConfig.pm index 6f99329..3a24579 100644 --- a/scripts/VyattaConfig.pm +++ b/scripts/VyattaConfig.pm @@ -190,8 +190,8 @@ sub returnOrigValue { # node is relative sub returnValues { my $val = returnValue(@_); - my @values; - if ($val) { + my @values = (); + if (defined($val)) { @values = split("\n", $val); } return @values; @@ -317,17 +317,16 @@ sub listNodeStatus { my ($self, $path) = @_; my @nodes = (); my %nodehash = (); - my $node = undef; # find deleted nodes first @nodes = $self->listDeleted("$path"); - foreach $node (@nodes) { + foreach my $node (@nodes) { if ($node =~ /.+/) { $nodehash{$node} = "deleted" }; } @nodes = (); @nodes = $self->listNodes("$path"); - foreach $node (@nodes) { + foreach my $node (@nodes) { if ($node =~ /.+/) { #print "DEBUG VyattaConfig->listNodeStatus(): node $node\n"; # No deleted nodes -- added, changed, ot static only. |