I have been using the inspircd daemon to run an internal IRC server. It's been working great. I have compiled it with the PGSQL support, so I can authenticate against users whose data is in the database, so I don't have to restart the IRC server to add new users. This has also been working great. I noticed today, when rebooting the machine, after applying the latest binary updates from 'freebsd-update', that the inspircd daemon failed to restart properly. In /var/log/messages, I see: Jun 19 14:27:08 XXXX postgres[1055]: [2-1] FATAL: the database system is starting up Jun 19 14:27:08 XXXX kernel: pid 1041 (inspircd), uid 72: exited on signal 11 The basic problem is that inspircd can be started before the postgresql daemon, or before the postgresql daemon is ready to serve data. And when that heppens, inspircd just core dumps. I was able to edit the /usr/local/etc/rc.d/inspircd file to list postgresql as a prerequisite for inspircd, and now it starts properly: *** /tmp/inspircd.orig Thu Jun 19 14:56:02 2014 --- inspircd Thu Jun 19 14:30:58 2014 *************** *** 3,9 **** # $FreeBSD: head/irc/inspircd/files/inspircd.in 343571 2014-02-10 01:46:33Z feld $ # # PROVIDE: inspircd ! # REQUIRE: DAEMON # BEFORE: LOGIN # KEYWORD: shutdown --- 3,9 ---- # $FreeBSD: head/irc/inspircd/files/inspircd.in 343571 2014-02-10 01:46:33Z feld $ # # PROVIDE: inspircd ! # REQUIRE: DAEMON postgresql # BEFORE: LOGIN # KEYWORD: shutdown It would be nice if the inspircd port would adjust the startup file if PGSQL was set as an option. I would guess that a similar problem exists for MYSQL support too. Thanks!
Over to maintainer.
A commit references this bug: Author: feld Date: Fri Sep 12 17:24:45 UTC 2014 New revision: 368050 URL: http://svnweb.freebsd.org/changeset/ports/368050 Log: Alter rc script startup ordering. In the event the user is running Inspircd with a MySQL or Postgres backend it will fail to start on boot if it comes up before the database does. PR: 191187 Changes: head/irc/inspircd/Makefile head/irc/inspircd/files/inspircd.in
bdrewery confirmed for me that items in the BEFORE: don't have to be installed; it's just for ordering.