mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
- 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
This commit is contained in:
parent
ced77791a9
commit
927dff6c47
6 changed files with 145 additions and 1 deletions
|
@ -535,3 +535,4 @@ Docs/internals.html
|
|||
Docs/internals.pdf
|
||||
Docs/internals.txt
|
||||
Docs/internals_toc.html
|
||||
scripts/make_win_src_distribution
|
||||
|
|
|
@ -22,7 +22,11 @@ EXTRA_DIST = Info.plist.sh \
|
|||
StartupParameters.plist.sh \
|
||||
postinstall.sh \
|
||||
preinstall.sh \
|
||||
ReadMe.txt
|
||||
ReadMe.txt \
|
||||
MySQL \
|
||||
StartupItem.Description.plist \
|
||||
StartupItem.Info.plist \
|
||||
StartupItem.postinstall
|
||||
|
||||
pkgdata_DATA = Info.plist \
|
||||
Description.plist \
|
||||
|
|
46
support-files/MacOSX/MySQL
Executable file
46
support-files/MacOSX/MySQL
Executable file
|
@ -0,0 +1,46 @@
|
|||
#!/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
|
15
support-files/MacOSX/StartupItem.Description.plist
Normal file
15
support-files/MacOSX/StartupItem.Description.plist
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?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>
|
42
support-files/MacOSX/StartupItem.Info.plist
Normal file
42
support-files/MacOSX/StartupItem.Info.plist
Normal file
|
@ -0,0 +1,42 @@
|
|||
<?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>
|
36
support-files/MacOSX/StartupItem.postinstall
Executable file
36
support-files/MacOSX/StartupItem.postinstall
Executable file
|
@ -0,0 +1,36 @@
|
|||
#!/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
|
Loading…
Reference in a new issue