diff options
author | Michael Larson <slioch@slioch.vyatta.com> | 2010-06-11 15:18:17 -0700 |
---|---|---|
committer | Michael Larson <slioch@slioch.vyatta.com> | 2010-06-11 15:18:17 -0700 |
commit | ee5e4fb5ba06385bfd36c93eaa9cb7891c266c8e (patch) | |
tree | c2394725a9c801e75219d15d3ae3576401a6cc3f /lib | |
parent | 2f5e7e7e9aa7669de5e5fb9025cb319e8b493904 (diff) | |
download | vyatta-cfg-ee5e4fb5ba06385bfd36c93eaa9cb7891c266c8e.tar.gz vyatta-cfg-ee5e4fb5ba06385bfd36c93eaa9cb7891c266c8e.zip |
allow for reverse difference between configurations.
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Vyatta/ConfigLoad.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Vyatta/ConfigLoad.pm b/lib/Vyatta/ConfigLoad.pm index 033aec0..685a63b 100755 --- a/lib/Vyatta/ConfigLoad.pm +++ b/lib/Vyatta/ConfigLoad.pm @@ -384,6 +384,7 @@ sub findSetNodes { sub getConfigDiff { $active_cfg = new Vyatta::Config; $new_cfg_ref = shift; + my $reverse = shift; @set_list = (); # @disable_list = (); @delete_list = (); @@ -392,6 +393,11 @@ sub getConfigDiff { # need to filter out deletions of nodes with default values my @new_delete_list = (); + if ($reverse == 'true') { + my @tmp = @delete_list; + @delete_list = @set_list; + @set_list = @tmp; + } foreach my $del (@delete_list) { my @comps = map { my $file = $_; |