openbsd-ports/databases/mysql/patches/patch-scripts_mysql_install_db_sh
brad ae711204e0 Upgrade to MySQL 5.0.67.
Tested by sthen@ on amd64/sparc64.
2008-08-24 08:40:02 +00:00

61 lines
1.6 KiB
Plaintext

$OpenBSD: patch-scripts_mysql_install_db_sh,v 1.10 2008/08/24 08:40:03 brad Exp $
--- scripts/mysql_install_db.sh.orig Mon Aug 4 08:20:02 2008
+++ scripts/mysql_install_db.sh Fri Aug 8 17:22:43 2008
@@ -25,7 +25,8 @@ srcdir=""
args=""
defaults=""
mysqld_opt=""
-user=""
+user=_mysql
+group=_mysql
force=0
in_rpm=0
@@ -102,6 +103,8 @@ parse_arguments()
# as 'user' (crucial e.g. if log-bin=/some_other_path/
# where a chown of datadir won't help)
user=`parse_arg "$arg"` ;;
+ --group=*)
+ group=`parse_arg "$arg"` ;;
--skip-name-resolve) ip_only=1 ;;
--verbose) verbose=1 ;; # Obsolete
--rpm) in_rpm=1 ;;
@@ -321,7 +324,7 @@ do
fi
if test -w / -a ! -z "$user"
then
- chown $user $dir
+ chown -f $user:$group $dir
fi
done
@@ -364,11 +367,6 @@ then
echo
fi
- s_echo
- s_echo "To start mysqld at boot time you have to copy"
- s_echo "support-files/mysql.server to the right place for your system"
- s_echo
-
if test "$cross_bootstrap" -eq 0
then
# This is not a true installation on a running system. The end user must
@@ -389,16 +387,6 @@ then
echo
echo "See the manual for more instructions."
echo
-
- if test "$in_rpm" -eq 0
- then
- echo "You can start the MySQL daemon with:"
- echo "cd @prefix@ ; $bindir/mysqld_safe &"
- echo
- echo "You can test the MySQL daemon with mysql-test-run.pl"
- echo "cd mysql-test ; perl mysql-test-run.pl"
- echo
- fi
echo "Please report any problems with the @scriptdir@/mysqlbug script!"
echo
echo "The latest information about MySQL is available on the web at"