summaryrefslogtreecommitdiff
path: root/scripts/vyatta-load-config.pl
diff options
context:
space:
mode:
authorrbalocca <rbalocca@vyatta.com>2008-03-29 13:22:46 -0700
committerrbalocca <rbalocca@vyatta.com>2008-03-29 13:22:46 -0700
commit1f35cd2755bd37986a7c5a7065f545f849126491 (patch)
treefb528cfd6c56f21405c5464d6938bd7bcf0c9cd1 /scripts/vyatta-load-config.pl
parent9273d3172d39360d019d3e3256d2c537d2b71d80 (diff)
parent76aae0216871f8c4f3b1c2ebad6761e67ee3e799 (diff)
downloadvyatta-cfg-1f35cd2755bd37986a7c5a7065f545f849126491.tar.gz
vyatta-cfg-1f35cd2755bd37986a7c5a7065f545f849126491.zip
Merge branch 'glendale' into hollywood
Diffstat (limited to 'scripts/vyatta-load-config.pl')
-rwxr-xr-xscripts/vyatta-load-config.pl18
1 files changed, 18 insertions, 0 deletions
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");