1997-07-14 12:43:38 +00:00
|
|
|
#!/usr/bin/perl
|
|
|
|
#
|
1998-01-11 17:59:01 +00:00
|
|
|
# $Id: check_old_version,v 1.1 1997/07/14 12:43:38 jfitz Exp $
|
1997-07-14 12:43:38 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
if( -d "/var/db/msqldb" ) {
|
|
|
|
chdir( "/var/db/pkg" );
|
|
|
|
opendir( DIR, "." );
|
|
|
|
@oldmsql = grep( /^msql-2.0b[1234]$/, readdir( DIR ) );
|
1998-02-13 10:54:49 +00:00
|
|
|
closedir;
|
1997-07-14 12:43:38 +00:00
|
|
|
if( @oldmsql ) {
|
|
|
|
if( ! $ENV{OVERWRITE_DB} ) {
|
|
|
|
print <<END;
|
|
|
|
|
|
|
|
mSQL v2.0 beta 5 and above make changes to the AVL index format of your
|
|
|
|
databases. In order to preserve your existing data, you must:
|
|
|
|
- use msqldump to dump all your databases
|
|
|
|
- install beta 5 or above
|
|
|
|
- use msqladmin to drop and then create each of your databases
|
|
|
|
- use msql to reload your data
|
|
|
|
|
|
|
|
If you understand the consequences of this upgrade, please re-build this
|
|
|
|
port with the environment variable OVERWRITE_DB defined.
|
|
|
|
|
|
|
|
END
|
|
|
|
exit 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# EOF
|