diff options
author | Tom Grennan <tgrennan@io.vyatta.com> | 2007-12-13 18:24:14 -0800 |
---|---|---|
committer | Tom Grennan <tgrennan@io.vyatta.com> | 2007-12-13 18:24:14 -0800 |
commit | ffe748d96a12350760eaf8b199b4857c72f664c6 (patch) | |
tree | c36b6309fac295d6264ae570d7e3ec19d7410b93 /scripts/vyatta-save-config.pl | |
parent | 1d92ea297e4b28b292b7c735b2e9d1308156e285 (diff) | |
download | vyatta-cfg-ffe748d96a12350760eaf8b199b4857c72f664c6.tar.gz vyatta-cfg-ffe748d96a12350760eaf8b199b4857c72f664c6.zip |
assume bootfile_path is /opt/vyatta/etc/config
Diffstat (limited to 'scripts/vyatta-save-config.pl')
-rwxr-xr-x | scripts/vyatta-save-config.pl | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/scripts/vyatta-save-config.pl b/scripts/vyatta-save-config.pl index 26b8eec..bad7c45 100755 --- a/scripts/vyatta-save-config.pl +++ b/scripts/vyatta-save-config.pl @@ -5,19 +5,14 @@ use lib "/opt/vyatta/share/perl5/"; use VyattaConfigOutput; my $etcdir = "/opt/vyatta/etc"; -my $bootfile = ''; -if (-r "$etcdir/bootfile_path") { - $bootfile = `cat $etcdir/bootfile_path`; -} -my $bootpath = $bootfile; -$bootpath =~ s/\/[^\/]+$//; +my $bootpath = $etcdir . "/config"; +my $save_file = $bootpath . "/config.boot"; if ($#ARGV > 0) { print "Usage: save [config_file_name]\n"; exit 1; } -my $save_file = "$bootfile"; if (defined($ARGV[0])) { $save_file = $ARGV[0]; if (!($save_file =~ /^\//)) { |