diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2008-03-26 12:32:24 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2008-03-26 12:32:24 -0700 |
commit | 76aae0216871f8c4f3b1c2ebad6761e67ee3e799 (patch) | |
tree | dc72732c1de11539623e71a9c81fc4ef58d87b89 /scripts | |
parent | dedc3083522c70de84db4d2e7bef21998debd18f (diff) | |
download | vyatta-cfg-76aae0216871f8c4f3b1c2ebad6761e67ee3e799.tar.gz vyatta-cfg-76aae0216871f8c4f3b1c2ebad6761e67ee3e799.zip |
fix for bug 3032:
* rename pre-glendale start-up config.
* warn user when loading a pre-glendale config.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-load-config.pl | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/vyatta-load-config.pl b/scripts/vyatta-load-config.pl index a432d8c..05323e3 100755 --- a/scripts/vyatta-load-config.pl +++ b/scripts/vyatta-load-config.pl @@ -40,6 +40,24 @@ if (!($load_file =~ /^\//)) { $load_file = "$bootpath/$load_file"; } +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"); |