summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/VyattaConfigLoad.pm3
-rwxr-xr-xscripts/vyatta-load-config.pl18
2 files changed, 21 insertions, 0 deletions
diff --git a/scripts/VyattaConfigLoad.pm b/scripts/VyattaConfigLoad.pm
index 9605017..c4ce8bd 100755
--- a/scripts/VyattaConfigLoad.pm
+++ b/scripts/VyattaConfigLoad.pm
@@ -30,6 +30,8 @@ use VyattaConfig;
my $default_rank = 0;
my %config_rank = (
'qos-policy' => 110,
+ 'firewall' => 102,
+ 'service nat' => 101,
'interfaces' => 100,
'interfaces bridge' => 99,
'interfaces ethernet' => 98,
@@ -38,6 +40,7 @@ my %config_rank = (
'protocols static' => 85,
'service ssh' => 84,
'service telnet' => 83,
+ 'vpn' => 80,
);
my @all_nodes = ();
diff --git a/scripts/vyatta-load-config.pl b/scripts/vyatta-load-config.pl
index f845c24..9513ffa 100755
--- a/scripts/vyatta-load-config.pl
+++ b/scripts/vyatta-load-config.pl
@@ -43,6 +43,24 @@ if (defined($ARGV[0])) {
}
}
+if (!open(CFG, "<$load_file")) {
+ print "Cannot open configuration file $load_file\n";
+ exit 1;
+}
+while (<CFG>) {
+ if (/\/\*XORP Configuration File, v1.0\*\//) {
+ print "Warning: Loading a pre-Glendale configuration.\n";
+ print "Do you want to continue? [no] ";
+ my $resp = <STDIN>;
+ if (!($resp =~ /^yes$/i)) {
+ print "Configuration not loaded\n";
+ exit 1;
+ }
+ last;
+ }
+}
+close CFG;
+
# do config migration
system("$sbindir/vyatta_config_migrate.pl $load_file");