From f63df41315292b510ac5c6fbaf686ee38955f716 Mon Sep 17 00:00:00 2001 From: kueller Date: Tue, 20 Apr 2010 18:25:31 +0000 Subject: [PATCH] Vorbereitung fuer upstart git-svn-id: svn://svn.compuextreme.de/Viitor/V962/Viitor_mysql@5542 504e572c-2e33-0410-9681-be2bf7408885 --- etc/init/mysql.conf | 15 +++++++++++++++ init/genpkg | 33 +++++++++++++++++---------------- 2 files changed, 32 insertions(+), 16 deletions(-) create mode 100644 etc/init/mysql.conf diff --git a/etc/init/mysql.conf b/etc/init/mysql.conf new file mode 100644 index 0000000..f2ba705 --- /dev/null +++ b/etc/init/mysql.conf @@ -0,0 +1,15 @@ +description "Startup MySQL DAtabase" +author "Harald Kueller " +version 1.0 +emits none special + +start on (runlevel [2345] and (started ifup)) +stop on runlevel [S016] + +console none + +script + source /etc/init/functions + source /etc/sysconfig/profile.d/MySQL + su - mysql -c "/opt/MySQL/bin/mysqld_safe" +end script diff --git a/init/genpkg b/init/genpkg index 641786d..0b6152d 100644 --- a/init/genpkg +++ b/init/genpkg @@ -24,22 +24,23 @@ # # -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 - +if [ -d /var/install/sysvinit* ]; then + 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 +fi cd /opt ln -s MySQL mysql cd $WDIR