summaryrefslogtreecommitdiff
path: root/scripts/vyatta-save-config.pl
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2007-11-02 17:01:43 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2007-11-02 17:01:43 -0700
commit902f98e233479bb9e8fffa9d158d14739714d48a (patch)
treed5684cf1dc78d05218b1c8e2a5f522919b9bf2a1 /scripts/vyatta-save-config.pl
parent0d97c5e0f56a22577abb0a38fec10a06e9b618e8 (diff)
downloadvyatta-cfg-902f98e233479bb9e8fffa9d158d14739714d48a.tar.gz
vyatta-cfg-902f98e233479bb9e8fffa9d158d14739714d48a.zip
* config-mode "show" command now hides default values.
* add "show -all" command to display all values. * "save" command saves all values.
Diffstat (limited to 'scripts/vyatta-save-config.pl')
-rwxr-xr-xscripts/vyatta-save-config.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/vyatta-save-config.pl b/scripts/vyatta-save-config.pl
index 300a5fe..26b8eec 100755
--- a/scripts/vyatta-save-config.pl
+++ b/scripts/vyatta-save-config.pl
@@ -4,8 +4,7 @@ use strict;
use lib "/opt/vyatta/share/perl5/";
use VyattaConfigOutput;
-my $sbindir = $ENV{vyatta_sbindir};
-my $etcdir = $ENV{vyatta_sysconfdir};
+my $etcdir = "/opt/vyatta/etc";
my $bootfile = '';
if (-r "$etcdir/bootfile_path") {
$bootfile = `cat $etcdir/bootfile_path`;
@@ -35,6 +34,7 @@ if (! open(SAVE, ">$save_file")) {
print "Saving configuration to '$save_file'...";
select SAVE;
+VyattaConfigOutput::set_show_all(1);
VyattaConfigOutput::outputActiveConfig();
my $version_str = `/opt/vyatta/sbin/vyatta_current_conf_ver.pl`;
print SAVE $version_str;