mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-29 01:13:08 +00:00
- Use USERS and GROUPS
- Dequote RESTRICTED Feature safe: yes
This commit is contained in:
parent
1ac187e29a
commit
6b328ebfb9
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=286517
@ -17,10 +17,13 @@ CONFLICTS= msql-2*
|
||||
USE_LDCONFIG= YES
|
||||
USE_PERL5= YES
|
||||
|
||||
USERS= ${PORTNAME}
|
||||
GROUPS= ${USERS}
|
||||
|
||||
LATEST_LINK= msql3
|
||||
|
||||
# Not free for commercial use.
|
||||
RESTRICTED= "restrictive copyright (no commercial use)"
|
||||
RESTRICTED= restrictive copyright (no commercial use)
|
||||
|
||||
MAKE_ENV+= WRKSRC=${WRKSRC}
|
||||
|
||||
@ -40,17 +43,14 @@ do-configure:
|
||||
cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ./setup
|
||||
@${SETENV} ${MAKE_ENV} ${PERL} ${SCRIPTDIR}/customize_scripts
|
||||
|
||||
pre-install:
|
||||
@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
||||
|
||||
post-install:
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/scripts/run_daemon ${PREFIX}/bin
|
||||
.for f in msqladmin msqlimport msqlexport
|
||||
${CHGRP} msql ${PREFIX}/bin/${f}
|
||||
${CHGRP} ${GROUPS} ${PREFIX}/bin/${f}
|
||||
.endfor
|
||||
${CHGRP} msql ${PREFIX}/sbin/msql3d
|
||||
${CHGRP} ${GROUPS} ${PREFIX}/sbin/msql3d
|
||||
${CHMOD} 751 ${PREFIX}/etc/msql3/
|
||||
${CHOWN} -R msql:msql ${PREFIX}/etc/msql3/
|
||||
${CHOWN} -R ${USERS}:${GROUPS} ${PREFIX}/etc/msql3/
|
||||
${MKDIR} ${PREFIX}/etc/rc.d
|
||||
@if [ ! -f ${PREFIX}/etc/rc.d/msql3.sh ]; then \
|
||||
${ECHO_MSG} "Installing ${PREFIX}/etc/rc.d/msql3.sh startup file."; \
|
||||
@ -72,7 +72,17 @@ post-install:
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX})
|
||||
IGNORE="- You must manually obtain ${DISTFILES} from 'http://www.hughes.com.au/download/' and place it in ${DISTDIR}. The distribution requires registration prior to use"
|
||||
DISTFILE_INSTRUCTIONS= \n\
|
||||
- You must manually obtain ${DISTFILES} from \n\
|
||||
http://www.Hughes.com.au/download/\n\
|
||||
and place it in ${DISTDIR}.\n\
|
||||
The distribution requires registration prior to use.\n\n
|
||||
.endif
|
||||
|
||||
pre-fetch:
|
||||
.if defined(DISTFILE_INSTRUCTIONS)
|
||||
@${PRINTF} "${DISTFILE_INSTRUCTIONS}"
|
||||
@exit 1
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
if [ "$2" != "POST-DEINSTALL" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
USER=msql
|
||||
|
||||
if pw usershow "${USER}" 2>/dev/null 1>&2; then
|
||||
echo "To delete MSQL user permanently, use 'pw userdel ${USER}'"
|
||||
fi
|
||||
|
||||
exit 0
|
@ -1,34 +0,0 @@
|
||||
#!/bin/sh
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
if [ "$2" != "PRE-INSTALL" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
USER=msql
|
||||
GROUP=${USER}
|
||||
UID=98
|
||||
GID=${UID}
|
||||
|
||||
if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
|
||||
if pw groupadd ${GROUP} -g ${GID}; then
|
||||
echo "Added group \"${GROUP}\"."
|
||||
else
|
||||
echo "Adding group \"${GROUP}\" failed..."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
|
||||
if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
|
||||
-s "/bin/sh" -d "/var/db/msql3db" \
|
||||
-c "mSQL-3 pseudo-user"; \
|
||||
then
|
||||
echo "Added user \"${USER}\"."
|
||||
else
|
||||
echo "Adding user \"${USER}\" failed..."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
exit 0
|
Loading…
Reference in New Issue
Block a user