summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2010-11-09 18:16:03 -0800
committerStig Thormodsrud <stig@vyatta.com>2010-11-09 18:16:03 -0800
commitcd8b51cde7bf54540ebde69032c5772675b75f4c (patch)
tree37ba76930e7d74d02c1e9fff5e66b1beb6c370ad /scripts
parent9cb4bdc8ad4bc3bbb941c947f94e9eab9e408bce (diff)
downloadvyatta-config-mgmt-cd8b51cde7bf54540ebde69032c5772675b75f4c.tar.gz
vyatta-config-mgmt-cd8b51cde7bf54540ebde69032c5772675b75f4c.zip
Fix writing of config file on file rollback.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vyatta-config-mgmt.pl3
1 files changed, 2 insertions, 1 deletions
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";