summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTom Grennan <tgrennan@io.vyatta.com>2007-12-13 18:24:14 -0800
committerTom Grennan <tgrennan@io.vyatta.com>2007-12-13 18:24:14 -0800
commitffe748d96a12350760eaf8b199b4857c72f664c6 (patch)
treec36b6309fac295d6264ae570d7e3ec19d7410b93 /scripts
parent1d92ea297e4b28b292b7c735b2e9d1308156e285 (diff)
downloadvyatta-cfg-ffe748d96a12350760eaf8b199b4857c72f664c6.tar.gz
vyatta-cfg-ffe748d96a12350760eaf8b199b4857c72f664c6.zip
assume bootfile_path is /opt/vyatta/etc/config
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vyatta-load-config.pl6
-rwxr-xr-xscripts/vyatta-save-config.pl9
2 files changed, 3 insertions, 12 deletions
diff --git a/scripts/vyatta-load-config.pl b/scripts/vyatta-load-config.pl
index a6f037a..d011a65 100755
--- a/scripts/vyatta-load-config.pl
+++ b/scripts/vyatta-load-config.pl
@@ -8,11 +8,7 @@ use VyattaConfigLoad;
my $etcdir = $ENV{vyatta_sysconfdir};
my $sbindir = $ENV{vyatta_sbindir};
-my $bootpath = '';
-if (-r "$etcdir/bootfile_path") {
- $bootpath = `cat $etcdir/bootfile_path`;
-}
-$bootpath =~ s/\/[^\/]+$//;
+my $bootpath = $etcdir . "/config";
if ($#ARGV != 0) {
print "Usage: load <config_file_name>\n";
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 =~ /^\//)) {