View | Details | Raw Unified | Return to bug 143387
Collapse All | Expand All

(-)Makefile (-1 / +4 lines)
Lines 19-24 Link Here
19
SLAVEDIRS=	databases/mysql51-client databases/mysql51-scripts
19
SLAVEDIRS=	databases/mysql51-client databases/mysql51-scripts
20
GNU_CONFIGURE=	yes
20
GNU_CONFIGURE=	yes
21
MAKE_JOBS_SAFE=	yes
21
MAKE_JOBS_SAFE=	yes
22
USE_LDCONFIG=	yes
22
23
23
CONFIGURE_ARGS=	--localstatedir=/var/db/mysql \
24
CONFIGURE_ARGS=	--localstatedir=/var/db/mysql \
24
		--without-debug \
25
		--without-debug \
Lines 29-34 Link Here
29
		--with-comment='FreeBSD port: ${PKGNAME}' \
30
		--with-comment='FreeBSD port: ${PKGNAME}' \
30
		--enable-thread-safe-client
31
		--enable-thread-safe-client
31
32
33
USERS=		mysql
34
GROUPS=		mysql
35
32
.ifdef USE_MYSQL
36
.ifdef USE_MYSQL
33
.error You have `USE_MYSQL' variable defined either in environment or in make(1) arguments. Please undefine and try again.
37
.error You have `USE_MYSQL' variable defined either in environment or in make(1) arguments. Please undefine and try again.
34
.endif
38
.endif
Lines 160-166 Link Here
160
164
161
post-install:
165
post-install:
162
.if !defined(PACKAGE_BUILDING)
166
.if !defined(PACKAGE_BUILDING)
163
	@${SETENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
164
	@${CAT} ${PKGMESSAGE}
167
	@${CAT} ${PKGMESSAGE}
165
.endif
168
.endif
166
169
(-)pkg-install (-36 lines)
Removed Link Here
1
#!/bin/sh
2
3
PATH=/bin:/usr/sbin
4
5
case $2 in
6
POST-INSTALL)
7
	USER=mysql
8
	GROUP=${USER}
9
	UID=88
10
	GID=${UID}
11
12
	if pw group show "${GROUP}" 2>/dev/null; then
13
		echo "You already have a group \"${GROUP}\", so I will use it."
14
	else
15
		if pw groupadd ${GROUP} -g ${GID}; then
16
			echo "Added group \"${GROUP}\"."
17
		else
18
			echo "Adding group \"${GROUP}\" failed..."
19
			exit 1
20
		fi
21
	fi
22
23
	if pw user show "${USER}" 2>/dev/null; then
24
		echo "You already have a user \"${USER}\", so I will use it."
25
	else
26
		if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
27
			-d /nonexistent -s /sbin/nologin -c "MySQL Daemon"
28
		then
29
			echo "Added user \"${USER}\"."
30
		else
31
			echo "Adding user \"${USER}\" failed..."
32
			exit 1
33
		fi
34
	fi
35
	;;
36
esac

Return to bug 143387