Commit 4363c28c authored by unknown's avatar unknown

- Added some files to support-files/MacOSX to enable building the Mac OS X

   startup item: MySQL (the startup script), StartupItem.Description.plist,
   StartupItem.Info.plist (PKGMaker control files), StartupItem.postinstall
   (post-installation script for the Startup Item package)
 - modified support-files/MacOSX/Makefile.am to include the newly added files
   in the source distribution


BitKeeper/etc/ignore:
  Added scripts/make_win_src_distribution to the ignore list
support-files/MacOSX/Makefile.am:
  - added the Mac OS X StartupItem files to the source distribution
parent 02d844ee
...@@ -535,3 +535,4 @@ Docs/internals.html ...@@ -535,3 +535,4 @@ Docs/internals.html
Docs/internals.pdf Docs/internals.pdf
Docs/internals.txt Docs/internals.txt
Docs/internals_toc.html Docs/internals_toc.html
scripts/make_win_src_distribution
...@@ -22,7 +22,11 @@ EXTRA_DIST = Info.plist.sh \ ...@@ -22,7 +22,11 @@ EXTRA_DIST = Info.plist.sh \
StartupParameters.plist.sh \ StartupParameters.plist.sh \
postinstall.sh \ postinstall.sh \
preinstall.sh \ preinstall.sh \
ReadMe.txt ReadMe.txt \
MySQL \
StartupItem.Description.plist \
StartupItem.Info.plist \
StartupItem.postinstall
pkgdata_DATA = Info.plist \ pkgdata_DATA = Info.plist \
Description.plist \ Description.plist \
......
#!/bin/sh
#
# /Library/StartupItems/MySQL/MySQL
#
# A script to automatically start up MySQL on system bootup
# for Mac OS X. This is actually just a wrapper script around
# the standard mysql.server init script, which is included in
# the binary distribution.
#
# (c) 2003 MySQL AB
# Written by Lenz Grimmer <lenz@mysql.com>
#
# Source the common setup functions for startup scripts
test -r /etc/rc.common || exit 1
. /etc/rc.common
# The path to the mysql.server init script. The official MySQL
# Mac OS X packages are being installed into /usr/local/mysql.
SCRIPT="/usr/local/mysql/support-files/mysql.server"
StartService ()
{
if [ "${MYSQLCOM:=-NO-}" = "-YES-" ] ; then
ConsoleMessage "Starting MySQL database server"
$SCRIPT start > /dev/null 2>&1
fi
}
StopService ()
{
ConsoleMessage "Stopping MySQL database server"
$SCRIPT stop > /dev/null 2>&1
}
RestartService ()
{
ConsoleMessage "Restarting MySQL database server"
$SCRIPT restart > /dev/null 2>&1
}
if test -x $SCRIPT ; then
RunService "$1"
else
ConsoleMessage "Could not find MySQL startup script!"
fi
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IFPkgDescriptionDeleteWarning</key>
<string></string>
<key>IFPkgDescriptionDescription</key>
<string>This package enables MySQL to be started up automatically
on system bootup.</string>
<key>IFPkgDescriptionTitle</key>
<string>MySQL Startup Item</string>
<key>IFPkgDescriptionVersion</key>
<string>1.0</string>
</dict>
</plist>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleGetInfoString</key>
<string>MySQL Startup Item</string>
<key>CFBundleIdentifier</key>
<string>com.mysql.mysqlstartup</string>
<key>CFBundleName</key>
<string>MySQL Startup Item</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>IFMajorVersion</key>
<integer>1</integer>
<key>IFMinorVersion</key>
<integer>0</integer>
<key>IFPkgFlagAllowBackRev</key>
<false/>
<key>IFPkgFlagAuthorizationAction</key>
<string>RootAuthorization</string>
<key>IFPkgFlagDefaultLocation</key>
<string>/Library/StartupItems/</string>
<key>IFPkgFlagInstallFat</key>
<false/>
<key>IFPkgFlagIsRequired</key>
<false/>
<key>IFPkgFlagOverwritePermissions</key>
<true/>
<key>IFPkgFlagRelocatable</key>
<false/>
<key>IFPkgFlagRestartAction</key>
<string>NoRestart</string>
<key>IFPkgFlagRootVolumeOnly</key>
<true/>
<key>IFPkgFlagUpdateInstalledLanguages</key>
<false/>
<key>IFPkgFlagUseUserMask</key>
<false/>
<key>IFPkgFormatVersion</key>
<real>0.10000000149011612</real>
</dict>
</plist>
#!/bin/sh
#
# postinstall script for the MySQL Startup Item Installation package
#
# This script modifies /etc/hostconfig in the following ways:
#
# - On Mac OS X Server, it disables the startup of the default MySQL
# installation by changing the "MYSQL" start variable to "-NO-".
# - If not existent already, it adds a "MYSQLCOM" start variable, which
# defaults to "-YES-". An already existing MYSQLCOM variable will remain
# untouched.
#
# (c) 2003 MySQL AB
# Author: Lenz Grimmer <lenz@mysql.com>
#
CONFFILE="/etc/hostconfig"
TMPFILE=`basename $CONFFILE` || exit 1
TMPFILE=`mktemp -t $TMPFILE.tmp` || exit 1
test -e $CONFFILE || exit 1
# Disable the startup of the default MySQL installation that ships with
# Mac OS X Server to avoid conflicts with our installation on bootup
sed -e s/^MYSQL=-YES-/MYSQL=-NO-/g < $CONFFILE > $TMPFILE
# Add our MYSQLCOM startup variable (enabled by default)
grep -q "^MYSQLCOM" $CONFFILE > /dev/null 2>&1
if [ $? -ne 0 ] ; then
echo "MYSQLCOM=-YES-" >> $TMPFILE
fi
# Install the modified file into the default location
cp -f $CONFFILE $CONFFILE~ || exit 1
mv -f $TMPFILE $CONFFILE || echo "Error while installing new $CONFFILE!"
chmod 644 $CONFFILE
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment