summaryrefslogtreecommitdiff
path: root/scripts/vyatta-load-config.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/vyatta-load-config.pl')
-rwxr-xr-xscripts/vyatta-load-config.pl13
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/vyatta-load-config.pl b/scripts/vyatta-load-config.pl
index a432d8c..f845c24 100755
--- a/scripts/vyatta-load-config.pl
+++ b/scripts/vyatta-load-config.pl
@@ -28,16 +28,19 @@ use VyattaConfigLoad;
my $etcdir = $ENV{vyatta_sysconfdir};
my $sbindir = $ENV{vyatta_sbindir};
my $bootpath = $etcdir . "/config";
+my $load_file = $bootpath . "/config.boot";
-if ($#ARGV != 0) {
+if ($#ARGV > 0) {
print "Usage: load <config_file_name>\n";
exit 1;
}
-my $load_file = $ARGV[0];
-if (!($load_file =~ /^\//)) {
- # relative path
- $load_file = "$bootpath/$load_file";
+if (defined($ARGV[0])) {
+ $load_file = $ARGV[0];
+ if (!($load_file =~ /^\//)) {
+ # relative path
+ $load_file = "$bootpath/$load_file";
+ }
}
# do config migration