summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vyatta-config-mgmt.pl8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/vyatta-config-mgmt.pl b/scripts/vyatta-config-mgmt.pl
index 90bda6c..d125e36 100755
--- a/scripts/vyatta-config-mgmt.pl
+++ b/scripts/vyatta-config-mgmt.pl
@@ -273,12 +273,12 @@ if ($action eq 'diff') {
print "No changes between working and active configurations\n";
exit 0;
}
- my $tmp_config_file = "/tmp/config.boot.$$";
- system("cli-shell-api showCfg --show-active-only > $tmp_config_file");
- my $diff = `cli-shell-api showConfig --show-cfg1 $tmp_config_file --show-cfg2 \@WORKING --show-show-defaults --show-context-diff`;
+ my $show_args = '--show-show-defaults --show-context-diff';
+ # default behavior for showConfig is @ACTIVE vs. @WORKING, so no
+ # need to write to a file first
+ my $diff = `cli-shell-api showConfig $show_args`;
if (defined $diff and length($diff) > 0) {
print "$diff";
- system("rm $tmp_config_file");
} else {
print "No changes between working and active configurations\n";
exit 0;