[debian-mysql] Bug#852776: mariadb-server-10.1: init script doesn't specify it should be started prior to apache2 etc
Julian Gilbey
jdg at debian.org
Fri Jan 27 09:05:46 UTC 2017
Package: mariadb-server-10.1
Version: 10.1.21-2
Severity: normal
I note in the postinst that it says
update-rc.d mysql defaults 19 21
with the explanation given in debian/rules that this is so the mysqld
server begins before apache. However, with dependency-based boot
systems (which current installations are by default), the "19 21" no
longer has any effect: insserv only looks at the dependency
information in its header. In fact, on my system, because of the
dependencies on the various init scripts (which are just the default
Debian ones), apache2 comes in at S04apache2 while mysql comes in at
S05mysql!
To specify that mysql really should start prior to apache2 (and
presumably nginx as well; not sure what other servers), you would need
lines:
X-Start-Before: apache2
X-Stop-After: apache2
in the header of /etc/init.d/mysql.
But I don't see any dependency of apache2 on mysqld in its normal
configuration, and if a particular installation of apache2 does
require mysqld to be started in advance, then it is up to the sysadmin
of that system to add:
Should-Start: mysql
Should-Stop: mysql
to their instance of /etc/init.d/apache2 (or whatever other
appropriate init.d file).
So my suggestion is just to drop the "19 21" from the debian/rules so
as not to give the false impression that mysql is starting earlier.
Best wishes,
Julian
More information about the pkg-mysql-maint
mailing list