summaryrefslogtreecommitdiff
path: root/scripts/vyatta-config-gen-sets.pl
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2010-05-28 17:39:08 -0700
committerStig Thormodsrud <stig@vyatta.com>2010-05-28 17:39:08 -0700
commit1c37ea19b32beb370e0b802b19b5c2a3e25d4dd3 (patch)
treeb462b9bc58ac371ec5a66efa14a001f7a5cf487a /scripts/vyatta-config-gen-sets.pl
parentaa2ba10182681dcf4a9d7526b53d6c78ba421263 (diff)
downloadvyatta-cfg-1c37ea19b32beb370e0b802b19b5c2a3e25d4dd3.tar.gz
vyatta-cfg-1c37ea19b32beb370e0b802b19b5c2a3e25d4dd3.zip
Remove single quotes except on leaf-node.
Diffstat (limited to 'scripts/vyatta-config-gen-sets.pl')
-rwxr-xr-xscripts/vyatta-config-gen-sets.pl8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/vyatta-config-gen-sets.pl b/scripts/vyatta-config-gen-sets.pl
index 7cf4feb..be30477 100755
--- a/scripts/vyatta-config-gen-sets.pl
+++ b/scripts/vyatta-config-gen-sets.pl
@@ -42,8 +42,12 @@ if (scalar(@all_nodes) == 0) {
my $ret = 0;
foreach (@all_nodes) {
my ($path_ref) = @$_;
- my $cmd = "set " . (join ' ', @$path_ref);
- print "$cmd\n";
+ my $elements = scalar(@$path_ref);
+ my @non_leaf = @$path_ref[0 .. ($elements - 2)] ;
+ my $path = join(' ', @non_leaf);
+ $path =~ s/'//g;
+ my $cmd = "set $path " . @$path_ref[($elements - 1)];
+ print "$cmd\n";
}
print "commit\n";