From 0e949fa5caa53593b35e01662a11860e8783b78d Mon Sep 17 00:00:00 2001 From: dirk Date: Sun, 4 Jul 1999 14:55:14 +0000 Subject: - install gifs for HTML documentation - put mysqld in a sandbox: - create user and group 'mysql' (uid and gid 88) - start mysqld with user 'mysql' --- databases/mysql55-server/Makefile | 8 +++++--- databases/mysql55-server/pkg-install | 38 ++++++++++++++++++++++++++++++++++++ databases/mysql55-server/pkg-plist | 34 ++++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+), 3 deletions(-) create mode 100644 databases/mysql55-server/pkg-install (limited to 'databases/mysql55-server') diff --git a/databases/mysql55-server/Makefile b/databases/mysql55-server/Makefile index 8e7bbe5..b937849 100644 --- a/databases/mysql55-server/Makefile +++ b/databases/mysql55-server/Makefile @@ -3,7 +3,7 @@ # Date created: 26 Jan 1998 # Whom: Josh Tiefenbach # -# $Id: Makefile,v 1.56 1999/06/23 21:29:27 billf Exp $ +# $Id: Makefile,v 1.57 1999/07/01 08:44:48 dirk Exp $ # DISTNAME= mysql-3.22.23b @@ -78,21 +78,23 @@ pre-install: post-install: .if !defined(PACKAGE_BUILDING) ${PREFIX}/bin/mysql_install_db + @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .endif @${ECHO} "#!/bin/sh" > ${PREFIX}/etc/rc.d/mysql-server.sh @${ECHO} "#" >> ${PREFIX}/etc/rc.d/mysql-server.sh @${ECHO} "" >> ${PREFIX}/etc/rc.d/mysql-server.sh @${ECHO} "if [ -x ${PREFIX}/bin/safe_mysqld ]" >> ${PREFIX}/etc/rc.d/mysql-server.sh @${ECHO} "then" >> ${PREFIX}/etc/rc.d/mysql-server.sh - @${ECHO} " ${PREFIX}/bin/safe_mysqld > /dev/null & && ${ECHO} -n ' mysql'" >> ${PREFIX}/etc/rc.d/mysql-server.sh + @${ECHO} " ${PREFIX}/bin/safe_mysqld --user=mysql > /dev/null & && ${ECHO} -n ' mysql'" >> ${PREFIX}/etc/rc.d/mysql-server.sh @${ECHO} "fi" >> ${PREFIX}/etc/rc.d/mysql-server.sh @/bin/chmod 750 ${PREFIX}/etc/rc.d/mysql-server.sh .if !defined(NOPORTDOCS) - ${MKDIR} ${PREFIX}/share/doc/mysql + ${MKDIR} ${PREFIX}/share/doc/mysql/Img .for doc in manual.html manual.ps manual_toc.html manual.txt manual.texi include.texi ${INSTALL_DATA} ${WRKSRC}/Docs/${doc} ${PREFIX}/share/doc/mysql .endfor + ${INSTALL_DATA} ${WRKSRC}/Docs/Img/*.gif ${PREFIX}/share/doc/mysql/Img ${INSTALL_DATA} ${WRKSRC}/Docs/mysql.info ${PREFIX}/info @install-info ${PREFIX}/info/mysql.info ${PREFIX}/info/dir .endif diff --git a/databases/mysql55-server/pkg-install b/databases/mysql55-server/pkg-install new file mode 100644 index 0000000..1c5dd86 --- /dev/null +++ b/databases/mysql55-server/pkg-install @@ -0,0 +1,38 @@ +#!/bin/sh + +PATH=/usr/sbin + +case $2 in +POST-INSTALL) + USER=mysql + GROUP=${USER} + UID=88 + GID=${UID} + + if pw group show "${GROUP}" 2>/dev/null; then + echo "You already have a group \"${GROUP}\", so I will use it." + else + if pw groupadd ${GROUP} -g ${GID}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi + fi + + if pw user show "${USER}" 2>/dev/null; then + echo "You already have a user \"${USER}\", so I will use it." + else + if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ + -d /var/db/mysql -s /sbin/nologin -c "MySQL Daemon" + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi + fi + + chown -R ${USER}.${GROUP} /var/db/mysql + ;; +esac diff --git a/databases/mysql55-server/pkg-plist b/databases/mysql55-server/pkg-plist index ad8ec6d..a3b8264 100644 --- a/databases/mysql55-server/pkg-plist +++ b/databases/mysql55-server/pkg-plist @@ -23,6 +23,39 @@ lib/mysql/libmystrings.a lib/mysql/libmysys.a lib/mysql/libnisam.a libexec/mysqld +share/doc/mysql/Img/australia.gif +share/doc/mysql/Img/austria.gif +share/doc/mysql/Img/bulgaria.gif +share/doc/mysql/Img/canada.gif +share/doc/mysql/Img/chile.gif +share/doc/mysql/Img/czech-republic.gif +share/doc/mysql/Img/denmark.gif +share/doc/mysql/Img/estonia.gif +share/doc/mysql/Img/finland.gif +share/doc/mysql/Img/france.gif +share/doc/mysql/Img/germany.gif +share/doc/mysql/Img/great-britain.gif +share/doc/mysql/Img/greece.gif +share/doc/mysql/Img/hungary.gif +share/doc/mysql/Img/israel.gif +share/doc/mysql/Img/italy.gif +share/doc/mysql/Img/japan.gif +share/doc/mysql/Img/mysql5.gif +share/doc/mysql/Img/netherlands.gif +share/doc/mysql/Img/poland.gif +share/doc/mysql/Img/portugal.gif +share/doc/mysql/Img/romania.gif +share/doc/mysql/Img/russia.gif +share/doc/mysql/Img/singapore.gif +share/doc/mysql/Img/south-africa.gif +share/doc/mysql/Img/south-africa1.gif +share/doc/mysql/Img/south-korea.gif +share/doc/mysql/Img/sweden.gif +share/doc/mysql/Img/switzerland.gif +share/doc/mysql/Img/taiwan.gif +share/doc/mysql/Img/tcxlogo3.gif +share/doc/mysql/Img/ukraine.gif +share/doc/mysql/Img/usa.gif share/doc/mysql/include.texi share/doc/mysql/manual.html share/doc/mysql/manual.ps @@ -69,6 +102,7 @@ share/mysql/spanish/errmsg.sys share/mysql/spanish/errmsg.txt share/mysql/swedish/errmsg.sys share/mysql/swedish/errmsg.txt +@dirrm share/doc/mysql/Img @dirrm share/doc/mysql @dirrm share/mysql/czech @dirrm share/mysql/dutch -- cgit v1.1