PaiPix feedback on /etc/init.d/mysql /etc/init.d/postgresql (tikiwiki and pmb)
Dear colleagues,
(This message is also relevant for the tikiwiki and pmb live
installation)
The database sever mysql (and also postgresql in the case of
PaiPix) have to start with the database files in /var/lib/mysql (...).
Most of the files in /var/lib are set as links in the knoppix boot
process. This is reasonable since it reduces the ramdisk consumption.
However the database servers do not work properly this way.
To make the databases read/write without waisting memory when the
servers are not running, I have modified the init scripts such that,
when they start, if they find links instead of files, they actually
rsync the full databases.
When we perform the disk installation the script still works
normally since it finds the proper databases in /var/lib/mysql and not
links. Any update of this for disk installations is also ok since these
features are no longer required. In the case of PaiPix this action is
also included for the installed packages tikiwiki
(http://www.tikiwiki.org) and the library catalog software pmb
(http://www.pizz.net/) that need some read/write files in /var/lib.
This patches are in attachment. Please consider that, in the mysql case,
the patch applies to the mysql version 4.1 server.
The Debian packages for tikiwiki and pmb are included in PaiPix and
available from our site:
http://aamorimsrv.fis.fc.ul.pt/mirrors/paipix/PAIPIX/i386/tikiwiki_1.9-4_all.deb
http://aamorimsrv.fis.fc.ul.pt/mirrors/paipix/PAIPIX/i386/phpmybibli_2.0-1_all.deb
(I will discuss these packages in another email).
All patches are available from one single Debian package:
http://aamorimsrv.fis.fc.ul.pt/mirrors/paipix/PAIPIX/i386/paipix-patches_3.7-7_all.deb
See also http://aamorimsrv.fis.fc.ul.pt/
All the best,
Antonio Amorim
--- mysql 2005-01-14 22:53:25.000000000 +0000
+++ mysql.new 2005-01-14 22:57:10.000000000 +0000
@@ -54,6 +54,19 @@
case "${1:-''}" in
'start')
+ #making soma data read-write to allow working on live cd
+ if [ -L /var/lib/mysql/mysql/db.frm ]; then
+ rsync -a --delete /KNOPPIX/var/lib/mysql/* /var/lib/mysql
+ echo "Making the MySQL Databases ReadWrite"
+ fi
+ if [ -L /var/lib/tikiwiki/tiki-install.php ]; then
+ rsync -a --delete /KNOPPIX/var/lib/tikiwiki/* /var/lib/tikiwiki
+ echo "Making the necessary tikiwiki pages ReadWrite"
+ fi
+ if [ -L /var/lib/phpmybibli/db_param.inc.php ]; then
+ rsync -a --delete /KNOPPIX/var/lib/phpmybibli/* /var/lib/phpmybibli
+ echo "Making the necessary phpMyBibli pages ReadWrite"
+ fi
# check for config file
if [ ! -r /etc/mysql/my.cnf ]; then
/bin/echo -e "\nWARNING: /etc/mysql/my.cnf cannot be read. See README.Debian."
--- ../../paipix-original/postgresql 2004-12-27 16:59:21.000000000 +0000
+++ postgresql 2004-12-27 17:21:01.000000000 +0000
@@ -28,6 +28,20 @@
}
startup () {
+ # PAIPIX
+ if [ -L /var/lib/postgres/data/base/1/PG_VERSION ]; then
+ rsync -a --delete /KNOPPIX/var/lib/postgres/* /var/lib/postgres
+ echo "Making the Postgresql Databases ReadWrite"
+ fi
+ if [ -L /var/lib/tikiwiki/tiki-install.php ]; then
+ rsync -a --delete /KNOPPIX/var/lib/tikiwiki/* /var/lib/tikiwiki
+ echo "Making the necessary tikiwiki Databases ReadWrite"
+ fi
+ if [ -L /var/lib/phpmybibli/db_param.inc.php ]; then
+ rsync -a --delete /KNOPPIX/var/lib/phpmybibli/* /var/lib/phpmybibli
+ echo "Making the necessary phpMyBibli pages ReadWrite"
+ fi
+
echo -n " postmaster"
assert_logfile
Reply to: