wok-4.x rev 1966
mysql: external init script support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jan 01 13:40:42 2009 +0000 (2009-01-01) |
parents | 283d55e62810 |
children | 69efa92df38e |
files | mysql/receipt mysql/stuff/etc/init.d/mysql |
line diff
1.1 --- a/mysql/receipt Thu Jan 01 07:51:22 2009 +0000 1.2 +++ b/mysql/receipt Thu Jan 01 13:40:42 2009 +0000 1.3 @@ -30,7 +30,7 @@ 1.4 # Rules to gen a SliTaz package suitable for Tazpkg. 1.5 genpkg_rules() 1.6 { 1.7 - mkdir -p $fs/usr/share $fs/etc $fs/var/lib/mysql $fs/var/run/mysqld 1.8 + mkdir -p $fs/usr/share $fs/etc/mysql.d $fs/var/lib/mysql $fs/var/run/mysqld 1.9 cp -a $_pkg/usr/bin $fs/usr 1.10 cp -a $_pkg/usr/libexec $fs/usr 1.11 cp -a $_pkg/usr/share/mysql $fs/usr/share
2.1 --- a/mysql/stuff/etc/init.d/mysql Thu Jan 01 07:51:22 2009 +0000 2.2 +++ b/mysql/stuff/etc/init.d/mysql Thu Jan 01 13:40:42 2009 +0000 2.3 @@ -25,11 +25,21 @@ 2.4 echo "Initializing $DESC: " 2.5 rm -rf /var/lib/mysql/* 2> /dev/null 2.6 mysql_install_db --user=mysql --datadir=/var/lib/mysql 2.7 + echo -n "Starting $DESC: $NAME... " 2.8 + $DAEMON $OPTIONS & 2.9 + status 2.10 + sleep 2 2.11 + for i in /etc/mysql.d/* ; do 2.12 + [ -x $i ] || continue 2.13 + echo "Running $i..." 2.14 + $i 2.15 + done 2.16 + else 2.17 + echo -n "Starting $DESC: $NAME... " 2.18 + $DAEMON $OPTIONS & 2.19 + status 2.20 + sleep 2 2.21 fi 2.22 - echo -n "Starting $DESC: $NAME... " 2.23 - $DAEMON $OPTIONS & 2.24 - status 2.25 - sleep 2 2.26 ;; 2.27 stop) 2.28 if [ ! -f $PIDFILE ] ; then