summaryrefslogtreecommitdiff
path: root/scripts/vyatta-save-config.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/vyatta-save-config.pl')
-rwxr-xr-xscripts/vyatta-save-config.pl9
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/vyatta-save-config.pl b/scripts/vyatta-save-config.pl
index 178eff7..51417b6 100755
--- a/scripts/vyatta-save-config.pl
+++ b/scripts/vyatta-save-config.pl
@@ -103,12 +103,13 @@ if ($mode eq 'local') {
}
select $save;
-my @show_cmd = ('cli-shell-api', 'showConfig', '--show-active-only',
- '--show-ignore-edit');
+my $show_cmd = 'cli-shell-api showConfig --show-active-only --show-ignore-edit';
if ($show_default) {
- push @show_cmd, '--show-show-defaults';
+ $show_cmd .= ' --show-show-defaults';
}
-open(my $show_fd, '-|', @show_cmd) or die 'Cannot execute config output';
+$show_cmd .= "| sed -e \'/--- CONFIGURATION COMMENTED OUT DURING MIGRATION BELOW ---/";
+$show_cmd .= ",/--- CONFIGURATION COMMENTED OUT DURING MIGRATION ABOVE ---/d\'";
+open(my $show_fd, '-|', $show_cmd) or die 'Cannot execute config output';
while (<$show_fd>) {
print;
}