From e17718269372c537a97cccd6a5c4a65be45fce25 Mon Sep 17 00:00:00 2001 From: espie Date: Tue, 12 Oct 2004 21:14:42 +0000 Subject: [PATCH] trim down INSTALL -> @newuser/@newgroup --- databases/mysql/pkg/INSTALL-server | 38 ++++-------------------------- databases/mysql/pkg/PLIST-server | 6 ++--- 2 files changed, 7 insertions(+), 37 deletions(-) diff --git a/databases/mysql/pkg/INSTALL-server b/databases/mysql/pkg/INSTALL-server index 376b49c707a..188694ef7b8 100644 --- a/databases/mysql/pkg/INSTALL-server +++ b/databases/mysql/pkg/INSTALL-server @@ -1,14 +1,11 @@ #!/bin/sh -# $OpenBSD: INSTALL-server,v 1.9 2004/06/23 04:04:05 brad Exp $ +# $OpenBSD: INSTALL-server,v 1.10 2004/10/12 21:14:42 espie Exp $ # # Pre/post-installation setup of MySQL PATH=/bin:/usr/bin:/sbin:/usr/sbin PREFIX=${PKG_PREFIX:-/usr/local} DB_DIR=${DB_DIR} -MYSQLUSER=_mysql -MYSQLGROUP=_mysql -ID=502 do_notice_existingdir() { @@ -27,46 +24,19 @@ do_notice_existingdir() echo } -do_usergroup_install() -{ - # Create MySQL user and group - groupinfo -e $MYSQLGROUP - if [ $? -eq 0 ]; then - echo "===> Using $MYSQLGROUP group for MySQL" - else - echo "===> Creating $MYSQLGROUP group for MySQL" - groupadd -g $ID $MYSQLGROUP - fi - userinfo -e $MYSQLUSER - if [ $? -eq 0 ]; then - echo "===> Using $MYSQLUSER user for MySQL" - else - echo "===> Creating $MYSQLUSER user for MySQL" - useradd -g $MYSQLGROUP -d /nonexistent -L daemon -c 'MySQL Account' -s /sbin/nologin -u $ID $MYSQLUSER - fi -} - do_database_install() { $PREFIX/bin/mysql_install_db } case $2 in - PRE-INSTALL) - if [ -d $DB_DIR ]; then - do_notice_existingdir $1 - fi - do_usergroup_install - ;; POST-INSTALL) - if [ ! -d $DB_DIR ]; then + if [ -d $DB_DIR ]; then + do_notice_existingdir + else do_database_install fi ;; - *) - echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2 - exit 1 - ;; esac exit 0 diff --git a/databases/mysql/pkg/PLIST-server b/databases/mysql/pkg/PLIST-server index 702b615f33c..ed4e96c68d2 100644 --- a/databases/mysql/pkg/PLIST-server +++ b/databases/mysql/pkg/PLIST-server @@ -1,4 +1,6 @@ -@comment $OpenBSD: PLIST-server,v 1.13 2004/08/10 00:52:43 espie Exp $ +@comment $OpenBSD: PLIST-server,v 1.14 2004/10/12 21:14:42 espie Exp $ +@newgroup _mysql:502 +@newuser _mysql:502:_mysql:daemon:MySQL Account:/nonexistent:/sbin/nologin bin/comp_err bin/isamchk bin/isamlog @@ -217,7 +219,5 @@ share/mysql/swedish/errmsg.txt share/mysql/ukrainian/ share/mysql/ukrainian/errmsg.sys share/mysql/ukrainian/errmsg.txt -@extraunexec userdel _mysql -@extraunexec groupdel _mysql @extraunexec rm -rf ${DB_DIR} @extraunexec rm -rf ${SOCKET_DIR}