diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2010-05-28 17:39:08 -0700 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2010-05-28 17:39:08 -0700 |
commit | 1c37ea19b32beb370e0b802b19b5c2a3e25d4dd3 (patch) | |
tree | b462b9bc58ac371ec5a66efa14a001f7a5cf487a /scripts | |
parent | aa2ba10182681dcf4a9d7526b53d6c78ba421263 (diff) | |
download | vyatta-cfg-1c37ea19b32beb370e0b802b19b5c2a3e25d4dd3.tar.gz vyatta-cfg-1c37ea19b32beb370e0b802b19b5c2a3e25d4dd3.zip |
Remove single quotes except on leaf-node.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-config-gen-sets.pl | 8 |
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"; |