From cd8b51cde7bf54540ebde69032c5772675b75f4c Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Tue, 9 Nov 2010 18:16:03 -0800 Subject: Fix writing of config file on file rollback. --- scripts/vyatta-config-mgmt.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/vyatta-config-mgmt.pl b/scripts/vyatta-config-mgmt.pl index 43e89f4..a28942a 100755 --- a/scripts/vyatta-config-mgmt.pl +++ b/scripts/vyatta-config-mgmt.pl @@ -327,7 +327,8 @@ if ($action eq 'rollback') { # Should have code to validate config, but for now only # called internally. If we later expose this to cli # we'll need to prompt for confirmation. - $rollback_config = cm_read_file($filename); + my @lines = cm_read_file($filename); + $rollback_config = join("\n", @lines); } if (!defined $method) { die "Error: must define either revnum or file"; -- cgit v1.2.3