From 63ce0b05d99225496f31ba9fd444ab2fefdc37e9 Mon Sep 17 00:00:00 2001 From: John Southworth Date: Thu, 14 Jul 2011 18:49:09 -0500 Subject: Don't allow users to set migration comments (cherry picked from commit 9f1ff5427e0f72f2bded287be6e1d4cf442945cb) --- scripts/vyatta-save-config.pl | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts') diff --git a/scripts/vyatta-save-config.pl b/scripts/vyatta-save-config.pl index 51417b6..6dc833c 100755 --- a/scripts/vyatta-save-config.pl +++ b/scripts/vyatta-save-config.pl @@ -107,6 +107,7 @@ my $show_cmd = 'cli-shell-api showConfig --show-active-only --show-ignore-edit'; if ($show_default) { $show_cmd .= ' --show-show-defaults'; } +# add a sed command to remove unwanted configuration comments. $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'; -- cgit v1.2.3