V962 Branch
git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_mysql@4397 504e572c-2e33-0410-9681-be2bf7408885
This commit is contained in:
commit
03545593f5
50
etc/init.d/mysql
Normal file
50
etc/init.d/mysql
Normal file
@ -0,0 +1,50 @@
|
||||
#!/bin/sh
|
||||
#Mysql start/stop initialisierungs script
|
||||
#Script Framework - Automatisiertes Erzeugen der Monsum Linux Distribution
|
||||
#(c) Rainmaker MultiMedia OHG
|
||||
#
|
||||
#$Author$
|
||||
#$Date$
|
||||
#$Revision$
|
||||
#
|
||||
#$Log$
|
||||
#Revision 1.7 2005/09/02 08:46:39 kueller
|
||||
#safe_mysqld wurde in mysql_safe umbenannt
|
||||
#
|
||||
#Revision 1.6 2003/04/19 08:15:46 kueller
|
||||
#reload und status Option entfernt - funktionieren nicht.
|
||||
#
|
||||
#Revision 1.5 2001/11/04 01:42:39 kueller
|
||||
#Echo Meldungen beim Startup zeigen jetzt auch welcher Dienst gestartet
|
||||
#oder gestoppt wird
|
||||
#
|
||||
#Revision 1.4 2001/10/08 08:51:49 kueller
|
||||
#cvs header hinzugefügt bzw. korrigiert
|
||||
#
|
||||
#
|
||||
|
||||
source /etc/init.d/functions
|
||||
source /etc/sysconfig/profile.d/MySQL
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting mysql"
|
||||
su - mysql -c "/opt/MySQL/bin/mysqld_safe &"
|
||||
;;
|
||||
|
||||
stop)
|
||||
echo -n "Stopping mysql"
|
||||
killproc mysqld_safe
|
||||
;;
|
||||
|
||||
restart)
|
||||
$0 stop
|
||||
sleep 1
|
||||
$0 start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|reload|restart|status}"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
17
etc/sysconfig/profile.d/MySQL
Normal file
17
etc/sysconfig/profile.d/MySQL
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
#Systeminitialisierung für MySQL
|
||||
#(c) Rainmaker MultiMedia OHG
|
||||
#
|
||||
#$Author$
|
||||
#$Date$
|
||||
#$Revision$
|
||||
#
|
||||
#$Log$
|
||||
#Revision 1.2 2001/10/08 08:51:50 kueller
|
||||
#cvs header hinzugefügt bzw. korrigiert
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
PATH=$PATH:/opt/MySQL/bin
|
||||
export PATH
|
45
init/genpkg
Normal file
45
init/genpkg
Normal file
@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
#Initialisierung der addons für MySQL
|
||||
#(c) Rainmaker MultiMedia OHG
|
||||
#
|
||||
#$Author$
|
||||
#$Date$
|
||||
#$Revision$
|
||||
#
|
||||
#$Log$
|
||||
#Revision 1.6 2007/04/29 12:03:08 kueller
|
||||
#beim wechel nach opt sollte das villeicht /opt lauten ??
|
||||
#
|
||||
#Revision 1.5 2006/08/24 16:24:11 segler
|
||||
#link /opt/MySQL -> /opt/mysql added for compatibility reasons (normally scripts are searching for /opt/mysql/include or such things)
|
||||
#
|
||||
#Revision 1.4 2006/05/16 13:35:22 kueller
|
||||
#Letztezeile hat nen verweis auf home enthalten (~). entfernt!
|
||||
#
|
||||
#Revision 1.3 2001/10/17 10:10:30 kueller
|
||||
#Rechtekorrektur für init script
|
||||
#
|
||||
#Revision 1.2 2001/10/08 08:51:50 kueller
|
||||
#cvs header hinzugefügt bzw. korrigiert
|
||||
#
|
||||
#
|
||||
|
||||
WDIR=`pwd`
|
||||
cd etc/init.d
|
||||
chmod 755 mysql
|
||||
mkdir rc{0,1,2,3,4,5,6}.d
|
||||
for i in 0 1 6; do
|
||||
cd rc$i.d
|
||||
ln -s ../mysql K26mysql
|
||||
cd ..
|
||||
done
|
||||
for i in 2 3 4 5; do
|
||||
cd rc$i.d
|
||||
ln -s ../mysql S21mysql
|
||||
cd ..
|
||||
done
|
||||
cd $WDIR
|
||||
|
||||
cd /opt
|
||||
ln -s MySQL mysql
|
||||
cd $WDIR
|
74
tmp/postinstall
Normal file
74
tmp/postinstall
Normal file
@ -0,0 +1,74 @@
|
||||
#!/bin/bash
|
||||
#Framework, welches ein komplettes Linux System aus den Sourcen erstellt
|
||||
#dieses Framework wird im CVS Repository
|
||||
#:pserver:cvs.rainmaker-mm.de/RMM/cvs zur Verfügung gestellt
|
||||
#
|
||||
#Lage dieser Datei im Archiv: $Source$
|
||||
#
|
||||
#(c) Rainmaker MultiMedia OHG
|
||||
#This program is free software; you can redistribute it and/or
|
||||
#modify ist under the terms of the GNU General Public License
|
||||
#as published by the Free Software Foundation; either version
|
||||
#2 of the License, or (at your option) any later version.
|
||||
#
|
||||
#This program is distributed in the hope that it will be useful,
|
||||
#but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#See the GNU General Public License for more details.
|
||||
#
|
||||
#You should have received a copy of the GNU General Public License
|
||||
#along with this program; if not write to the Free Software Foundation,
|
||||
#Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
#Beschreibung:
|
||||
#postinstall für mySQL. Erzeugt die notwendigen Einträge unter
|
||||
#/etc/ld.so.conf. Ausserdem wird eine mySQL Datenbank initialisiert.
|
||||
#
|
||||
#Aufrufparameter:
|
||||
#keine
|
||||
#
|
||||
#Letzte Änderung von: $Author$
|
||||
#Datum der letzten Änderung: $Date$
|
||||
#Version der Datei: $Revision$
|
||||
#
|
||||
#$Log$
|
||||
#Revision 1.11 2007/04/29 11:59:52 kueller
|
||||
#UID 48 fuer mysql festgelegt
|
||||
#
|
||||
#Revision 1.10 2006/10/20 09:06:38 kueller
|
||||
#Anpassung an 32/64 Bit Viitor
|
||||
#
|
||||
#Revision 1.9 2005/09/02 09:46:20 kueller
|
||||
#die dbinit darf inzwischen unter root laufen und stelle keine Fragen mehr
|
||||
#Der bisherige aufruf hat sogar komplet ./var geloescht. Dadurch ist mysql
|
||||
#gar nicht mehr gestartet.
|
||||
#
|
||||
#Revision 1.8 2005/09/02 07:54:44 kueller
|
||||
#mysql_install heisst in der neuen Version mysql_install_db
|
||||
#
|
||||
#Revision 1.7 2003/11/11 11:20:09 kueller
|
||||
#installation wird nun von mysql_install erledigt. Script entsprechend geändert
|
||||
#
|
||||
#Revision 1.6 2002/10/09 08:33:18 kueller
|
||||
#Einsatz des neuen GPL Monsum Projekt Headers
|
||||
#
|
||||
#
|
||||
#Revision 1.5 2001/10/08 08:51:50 kueller
|
||||
#cvs header hinzugefügt bzw. korrigiert
|
||||
#
|
||||
#
|
||||
|
||||
LIBINST=`grep "/opt/MySQL/lib/mysql" /etc/ld.so.conf`
|
||||
if [ ! "$LIBINST" ]; then
|
||||
echo "/opt/MySQL/lib/mysql" >>/etc/ld.so.conf
|
||||
if [ -d /opt/MySQL/lib64 ]; then
|
||||
echo "/opt/MySQL/lib64/mysql" >>/etc/ld.so.conf
|
||||
fi
|
||||
fi
|
||||
if ! getent passwd mysql 2>&1 >/dev/null; then
|
||||
useradd -u 48 -g daemon -d /opt/MySQL/var -s /bin/bash mysql
|
||||
fi
|
||||
|
||||
mkdir /opt/MySQL/var
|
||||
/opt/MySQL/bin/mysql_install_db
|
||||
chown -R mysql:daemon /opt/MySQL/var
|
Loading…
Reference in New Issue
Block a user