Lines Matching refs:opt

159   my $opt = shift;
172 $opt,
208 usage() if $opt->{help};
210 if ( $opt->{'no-defaults'} && ( $opt->{'defaults-extra-file'} ||
211 $opt->{'defaults-file'} ) )
213 error($opt,
231 my $opt = shift;
290 foreach my $opt ( @_ )
292 next unless $opt; # If undefined or empty, just skip
293 push(@cmd, "\"$opt\""); # Quote argument
419 my $opt = {};
420 parse_arguments($opt, 'PICK-ARGS-FROM-ARGV', @ARGV);
426 if ( $opt->{srcdir} ) {
427 $basedir= $opt->{builddir};
429 $basedir= $opt->{basedir};
445 if ( $opt->{srcdir} and $opt->{basedir} )
447 error($opt,"Specify either --basedir or --srcdir, not both");
449 if ( $opt->{'keep-my-cnf'} )
453 if ( $opt->{srcdir} )
455 $opt->{builddir} = $opt->{srcdir} unless $opt->{builddir};
456 $print_defaults = "$opt->{builddir}/extra/my_print_defaults";
460 $print_defaults = find_in_basedir($opt,"file","my_print_defaults","bin","extra");
481 my $cfg_template= find_in_basedir($opt,"file","my-default.$cnfext",
499 open (TEMPL, $cfg_template) or error($opt, "Could not open config template $cfg_template");
507 warning($opt,"Could not write to config file $copy_cfg_file: $!");
520 if ( $opt->{'defaults-file'} )
523 "--defaults-file=$opt->{'defaults-file'}",
531 open(PIPE, "$cmd |") or error($opt,"can't run $cmd: $!");
539 $opt = {}; # Reset the arguments FIXME ?
540 parse_arguments($opt, @default_options);
541 parse_arguments($opt, 'PICK-ARGS-FROM-ARGV', @ARGV);
547 if ( $opt->{'random-passwords'} ) {
554 delete $opt->{'random-passwords'};
564 delete $opt->{'random-passwords'};
576 if ( $opt->{srcdir} )
581 $mysqld_opt = "--language=$opt->{srcdir}/sql/share/english";
582 $pkgdatadir = "$opt->{srcdir}/scripts";
583 $scriptdir = "$opt->{srcdir}/scripts";
585 elsif ( $opt->{basedir} )
587 $bindir = "$opt->{basedir}/bin";
589 $mysqld = find_in_basedir($opt,"file",["mysqld-nt","mysqld"],
591 find_in_basedir($opt,"file","mysqld-nt",
593 $pkgdatadir = find_in_basedir($opt,"dir","fill_help_tables.sql",
595 $scriptdir = "$opt->{basedir}/scripts";
606 unless ( $opt->{ldata} )
608 $opt->{ldata} = '@localstatedir@';
611 if ( $opt->{srcdir} )
613 $pkgdatadir = "$opt->{srcdir}/scripts";
639 if ( !$opt->{'cross-bootstrap'} and !$opt->{rpm} and !$opt->{force} )
649 error($opt,
657 warning($opt,
668 if ( $opt->{'skip-name-resolve'} and $resolved and $resolved =~ /\s/ )
683 my $parent = dirname ( $opt->{ldata} );
685 error($opt,
686 "The parent directory for the data directory '$opt->{ldata}' does not exist.",
692 my $opt_user= $opt->{user};
698 warning($opt, "The --user option is not supported on Windows, ignoring");
707 foreach my $dir ( $opt->{ldata}, "$opt->{ldata}/mysql", "$opt->{ldata}/test" )
713 or error($opt, "Could not chown directory $dir");
717 push(@args, "--user=$opt->{user}") if $opt->{user};
726 if ( $opt->{'no-defaults'} )
730 elsif ( $opt->{'defaults-file'} )
732 $defaults_option= "--defaults-file=$opt->{'defaults-file'}";
735 my $defaults_extra= "--defaults-extra-file=$opt->{'defaults-extra-file'}"
736 if $opt->{'defaults-extra-file'};
745 "--datadir=$opt->{ldata}",
758 report_verbose_wait($opt,"Installing MySQL system tables...");
761 or error($opt,"can't open $create_system_tables for reading: $!");
763 or error($opt,"can't open $fill_system_tables for reading: $!");
773 next if $opt->{'cross-bootstrap'} and /\@current_hostname/;
782 next if $opt->{'cross-bootstrap'} and /\@current_hostname/;
787 if ( $opt->{'random-passwords'} )
790 or error($opt,"can't open $security_commands for reading: $!");
805 report_verbose($opt,"OK");
811 report_verbose_wait($opt,"Filling help tables...");
813 or error($opt,"can't open $fill_help_tables for reading: $!");
825 report_verbose($opt,"OK");
829 warning($opt,"HELP FILES ARE NOT COMPLETELY INSTALLED!",
833 report_verbose($opt,"To start mysqld at boot time you have to copy",
837 if ( !$opt->{'cross-bootstrap'} )
843 if ( $opt->{'random-passwords'} ) {
844 report($opt,
863 report($opt,
881 if ( !$opt->{rpm} )
883 report($opt,
892 report($opt,
903 report($opt,
909 report($opt,
916 warning($opt,
924 warning($opt,
934 check_sys_cfg_file ($opt, $cfg);
941 error($opt,
944 "Examine the logs in $opt->{ldata} for more information.",
955 "gives you a log in $opt->{ldata} that may be helpful.",
975 my $opt= shift;
980 warning($opt,
990 my $opt = shift;
993 report_verbose_wait($opt, $text, @_);
999 my $opt = shift;
1002 if ( $opt->{verbose} or (!$opt->{rpm} and !$opt->{'cross-bootstrap'}) )
1011 my $opt = shift;
1021 my $opt = shift;
1031 my $opt = shift;