summaryrefslogtreecommitdiff
path: root/scripts/vyatta-load-config.pl
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2010-11-19 17:01:05 -0800
committerStig Thormodsrud <stig@vyatta.com>2010-11-19 17:01:05 -0800
commit862bf8cc9814c0dcc475f131e08218413cce4a32 (patch)
tree65cf6c73be5f599f40139504306b9eb51bb98a21 /scripts/vyatta-load-config.pl
parent7fa71f0279e15b11d64397e134e8c902522a71bb (diff)
downloadvyatta-cfg-862bf8cc9814c0dcc475f131e08218413cce4a32.tar.gz
vyatta-cfg-862bf8cc9814c0dcc475f131e08218413cce4a32.zip
Simplify check for if there are changes to commit after load/merge.
Diffstat (limited to 'scripts/vyatta-load-config.pl')
-rwxr-xr-xscripts/vyatta-load-config.pl9
1 files changed, 2 insertions, 7 deletions
diff --git a/scripts/vyatta-load-config.pl b/scripts/vyatta-load-config.pl
index c9094fd..f3339f7 100755
--- a/scripts/vyatta-load-config.pl
+++ b/scripts/vyatta-load-config.pl
@@ -277,13 +277,8 @@ foreach (@comment_list) {
#ignore error on complaint re: nested nodes
}
-my $tmp_config_file = "/tmp/config.boot.$$";
-my $tmp_config_file2 = "/tmp/config.boot2.$$";
-system("cli-shell-api showCfg --show-active-only > $tmp_config_file");
-system("cli-shell-api showCfg --show-working-only > $tmp_config_file2");
-my $diff = `diff -u $tmp_config_file $tmp_config_file2`;
-system("rm $tmp_config_file $tmp_config_file2");
-if (defined $diff and length($diff) < 1) {
+my $rc = system("cli-shell-api sessionChanged");
+if (defined $rc and $rc > 0) {
print "No configuration changes to commit\n";
exit 0;
}