diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-03-31 16:49:03 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-03-31 16:49:03 -0700 |
commit | 454ba249959ca26b512030c259b02ddc89f24582 (patch) | |
tree | 2bb98c0b5efdf9a5d85dc3f39163874a7008927d /scripts/vyatta-load-config.pl | |
parent | 0a350b99308762f1eb180aa47b64db78b3187c7e (diff) | |
parent | 388d5ed2580bc9ef7ee7a8cdc1d75126ea97a53e (diff) | |
download | vyatta-cfg-454ba249959ca26b512030c259b02ddc89f24582.tar.gz vyatta-cfg-454ba249959ca26b512030c259b02ddc89f24582.zip |
Merge branch 'glendale' of suva.vyatta.com:/git/vyatta-cfg into glendale
Diffstat (limited to 'scripts/vyatta-load-config.pl')
-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"); |