summaryrefslogtreecommitdiff
path: root/lib/Vyatta/Config.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Vyatta/Config.pm')
-rwxr-xr-xlib/Vyatta/Config.pm23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/Vyatta/Config.pm b/lib/Vyatta/Config.pm
index 82d835f..e4d74bb 100755
--- a/lib/Vyatta/Config.pm
+++ b/lib/Vyatta/Config.pm
@@ -329,6 +329,27 @@ sub returnValue {
return $tmp;
}
+## returnComment("node")
+# returns the value of "node" or undef if the node doesn't exist .
+# node is relative
+sub returnComment {
+ my ( $self, $node ) = @_;
+ my $tmp = undef;
+
+ $node =~ s/\//%2F/g;
+ $node =~ s/\s+/\//g;
+
+ return unless
+ open my $file, '<',
+ "$self->{_new_config_dir_base}/$node/.comment";
+
+ read $file, $tmp, 16384;
+ close $file;
+
+ $tmp =~ s/\n$//;
+ return $tmp;
+}
+
## returnOrigPlusComValue("node")
# returns the value of "node" or undef if the node doesn't exist .
# node is relative
@@ -808,6 +829,8 @@ sub parseTmplAll {
}
} elsif (/^help:\s+(\S.*)$/) {
$ret{help} = $1;
+ } elsif (/^enumeration:\s+(\S+)$/) {
+ $ret{enum} = $1;
}
}
close($tmpl);