diff options
author | unknown <jani@rhols221.adsl.netsonic.fi> | 2004-04-07 19:37:13 +0300 |
---|---|---|
committer | unknown <jani@rhols221.adsl.netsonic.fi> | 2004-04-07 19:37:13 +0300 |
commit | 8b33254424e3e324cbd4c031f8f53f12ddcaaf27 (patch) | |
tree | efca1361e13a05fbea8585c5c7fde4c92ccfe339 /scripts/mysqld_multi.sh | |
parent | 3c8ae8905240b0779c8e80f6957ba85fcb6e0e7a (diff) | |
download | mariadb-git-8b33254424e3e324cbd4c031f8f53f12ddcaaf27.tar.gz |
Fixed previous security patch. mysqld_safe will use the given --log=file,
or if not given, it will try to use the one in datadir, if possible, otherwise
log file will be disabled.
Diffstat (limited to 'scripts/mysqld_multi.sh')
-rw-r--r-- | scripts/mysqld_multi.sh | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh index a4f2b18fda8..b30d521c093 100644 --- a/scripts/mysqld_multi.sh +++ b/scripts/mysqld_multi.sh @@ -9,7 +9,7 @@ $VER="2.6"; $opt_config_file = undef(); $opt_example = 0; $opt_help = 0; -$opt_log = ""; +$opt_log = undef(); $opt_mysqladmin = "@bindir@/mysqladmin"; $opt_mysqld = "@libexecdir@/mysqld"; $opt_no_log = 0; @@ -47,7 +47,6 @@ sub main print "MySQL distribution.\n"; $my_print_defaults_exists= 0; } - init_log(); my @defops = `my_print_defaults mysqld_multi`; chop @defops; splice @ARGV, 0, 0, @defops; @@ -55,8 +54,8 @@ sub main "config-file=s","user=s","password=s","log=s","no-log","tcp-ip") || die "Wrong option! See $my_progname --help for detailed information!\n"; + init_log(); $groupids = $ARGV[1]; - if ($opt_version) { print "$my_progname version $VER by Jani Tolonen\n"; @@ -145,20 +144,9 @@ sub init_log } if (!defined($logdir)) { - $logdir= "/var/log" if (-d "/var/log" && -w "/var/log"); - } - if (!defined($logdir)) - { - if (-d "/tmp" && -w "/tmp" && ! -e "/tmp/mysqld_multi.log") - { - $logdir= "/tmp"; - } - } - if (!defined($logdir)) - { - # We still couldn't get a default log file in place. Log file - # will be disabled unless user sets it with an option - + # Log file was not specified and we could not log to a standard place, + # so log file be disabled for now. + print "WARNING: Log file disabled. Maybe directory/file isn't writable?\n"; $opt_no_log= 1; } else |