summaryrefslogtreecommitdiff
path: root/lib/Vyatta
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2010-11-05 17:56:37 -0700
committerStig Thormodsrud <stig@vyatta.com>2010-11-05 17:56:37 -0700
commit266ae832374d6231a0a662776c30ec597c6925aa (patch)
tree9b46ef4260cb4319eb13b21fdf56ca5af4c1fd7b /lib/Vyatta
parenta60321f3b38c93b200ff2705eebd4d274cda895d (diff)
downloadvyatta-config-mgmt-266ae832374d6231a0a662776c30ec597c6925aa.tar.gz
vyatta-config-mgmt-266ae832374d6231a0a662776c30ec597c6925aa.zip
Fixes for config-mgmt.
- fix permission problems - remove link on disable of commit-revisions. - don't push if file hasn't changed or on boot - save a baseline config when 1st starting the feature.
Diffstat (limited to 'lib/Vyatta')
-rw-r--r--lib/Vyatta/ConfigMgmt.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Vyatta/ConfigMgmt.pm b/lib/Vyatta/ConfigMgmt.pm
index a23b82b..1120fa4 100644
--- a/lib/Vyatta/ConfigMgmt.pm
+++ b/lib/Vyatta/ConfigMgmt.pm
@@ -30,7 +30,8 @@ our @EXPORT = qw(cm_commit_add_log cm_commit_get_log cm_get_archive_dir
cm_get_lr_conf_file cm_get_lr_state_file
cm_get_commit_hook_dir cm_write_file cm_read_file
cm_commit_get_file cm_commit_get_file_name
- cm_get_num_revs cm_get_last_commit_file);
+ cm_get_num_revs cm_get_last_commit_file
+ cm_get_last_push_file);
use base qw(Exporter);
use Vyatta::Config;
@@ -48,6 +49,7 @@ my $lr_conf_file = "$archive_dir/lr.conf";
my $lr_state_file = "$archive_dir/lr.state";
my $commit_log_file = "$archive_dir/commits";
my $last_commit_file = "$archive_dir/config.boot";
+my $last_push_file = "$archive_dir/config.boot-push";
sub cm_get_commit_hook_dir {
@@ -70,6 +72,10 @@ sub cm_get_last_commit_file {
return $last_commit_file;
}
+sub cm_get_last_push_file {
+ return $last_push_file;
+}
+
sub cm_read_file {
my ($file) = @_;
my @lines;