Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Nov 2006 10:50:52 +0200 (EET)
From:      Dmitry Pryanishnikov <dmitry@atlantis.dp.ua>
To:        ports@freebsd.org
Subject:   apache + php + mysql startup order
Message-ID:  <20061130103911.E14131@atlantis.atlantis.dp.ua>

next in thread | raw e-mail | index | archive | help

Hello!

   I'm trying to write an automated rc.d-script that should check MySQL 
database before it's used by the Apache+PHP hosting. So I've added a simple
script with the following block:

# PROVIDE: mysql-check
# BEFORE:  apache
# REQUIRE: mysql

This gives rcorder's warning:

rcorder: Circular dependency on provision `LOGIN' in file 
`/usr/local/etc/rc.d/mysql-server'.

yet forces the correct order:

/usr/local/etc/rc.d/mysql-server
/usr/local/etc/rc.d/mysql-check
/usr/local/etc/rc.d/apache.sh

Without this rc.d-file, apache starts before MySQL (since apache.sh contains
"# BEFORE: LOGIN" and mysql-server contains "# REQUIRE: LOGIN"). This default
order makes no sence to me: why to start apache if it can't correctly serve
the hosting w/o working MySQL server? So I feel that either

1) I don't understand something trivial, or

2) either rc.d/apache.sh or rc.d/mysql-server should be changed somehow
    in order to allow (if not force) to start apache _after_ mysqld.

Sincerely, Dmitry
-- 
Atlantis ISP, System Administrator
e-mail:  dmitry@atlantis.dp.ua
nic-hdl: LYNX-RIPE



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061130103911.E14131>