Changeset 760

Show
Ignore:
Timestamp:
03/08/07 02:40:27 (2 years ago)
Author:
hachi
Message:

Plugin idea for mogdbsetup. Let's the filepaths plugin add extra tables for creation, and then they get created at setup time.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/filepaths-20070306/server/mogdbsetup

    r664 r760  
    1919my $opt_noschemabump; 
    2020my $dbtype = "MySQL"; 
     21my $plugins; 
    2122 
    2223usage() 
     
    3334                      "noschemabump"     => \$opt_noschemabump, 
    3435                      "type=s"           => \$dbtype, 
     36                      "plugins=s"        => \$plugins, 
    3537                      ); 
    3638 
     
    7476my $sclass = "MogileFS::Store::$dbtype"; 
    7577eval "use $sclass; 1;" or die "Failed to load $sclass: $@"; 
     78 
     79foreach my $plugin (split /\s*,\s*/, $plugins) { 
     80    eval "use MogileFS::Plugin::$plugin; 1;" or die "Failed to load plugin $plugin: $@"; 
     81} 
    7682 
    7783confirm("This will attempt to setup or upgrade your MogileFS database.\nIt won't destroy existing data.\nRun with --help for more information.  Run with --yes to shut up these prompts.\n\nContinue?", 0);