diff options
author | Vladislav Vaintroub <vvaintroub@mysql.com> | 2009-12-11 21:17:17 +0100 |
---|---|---|
committer | Vladislav Vaintroub <vvaintroub@mysql.com> | 2009-12-11 21:17:17 +0100 |
commit | 91d9e6b670a51c9ace94a2d9439fa11a3335cff0 (patch) | |
tree | 907faecbe376506fb024d3a5c49d8db9a6cb1737 /scripts | |
parent | 670fb75598596fb02217ccdbf4100f3882adf7f5 (diff) | |
parent | bd1f8f5bfaf9748ca445401687cca97a89e0dfee (diff) | |
download | mariadb-git-91d9e6b670a51c9ace94a2d9439fa11a3335cff0.tar.gz |
merge
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mysql_install_db.sh | 8 | ||||
-rw-r--r-- | scripts/mysqld_safe.sh | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index 7e9b8a69677..b4cfc054b35 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -358,9 +358,15 @@ do mkdir -p $dir chmod 700 $dir fi - if test -w / -a ! -z "$user" + if test -n "$user" then chown $user $dir + if test $? -ne 0 + then + echo "Cannot change ownership of the database directories to the '$user'" + echo "user. Check that you have the necessary permissions and try again." + exit 1 + fi fi done diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index 95c4419273f..70b9b9f630e 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -160,7 +160,13 @@ parse_arguments() { fi for arg do - val=`echo "$arg" | sed -e "s;--[^=]*=;;"` + # the parameter after "=", or the whole $arg if no match + val=`echo "$arg" | sed -e 's;^--[^=]*=;;'` + # what's before "=", or the whole $arg if no match + optname=`echo "$arg" | sed -e 's/^\(--[^=]*\)=.*$/\1/'` + # replace "_" by "-" ; mysqld_safe must accept "_" like mysqld does. + optname_subst=`echo "$optname" | sed 's/_/-/g'` + arg=`echo $arg | sed "s/^$optname/$optname_subst/"` case "$arg" in # these get passed explicitly to mysqld --basedir=*) MY_BASEDIR_VERSION="$val" ;; |