Re: service doen't get started at boottime, but can start manually

From: O. Hartmann <ohartman_at_zedat.fu-berlin.de>
Date: Wed, 10 Sep 2014 12:19:22 +0200
Am Sun, 7 Sep 2014 11:16:37 -0500
Scot Hetzel <swhetzel_at_gmail.com> schrieb:

> On Sun, Sep 7, 2014 at 10:44 AM, Scot Hetzel <swhetzel_at_gmail.com> wrote:
> > I created the rc.d/refdbd script by copying /etc/rc.d/inetd and make a
> > few minor changes.
> > This script (untested) should do what the scripts/refdb.in and
> > scripts/refdbctl.in were doing:
> >
> > #!/bin/sh
> > #
> > # $FreeBSD$
> > #
> >
> > # PROVIDE: refdbd
> > # REQUIRE: LOGIN
> > # KEYWORD: shutdown
> >
> > . /etc/rc.subr
> >
> > name="refdbd"
> > rcvar="refdbd_enable"
> > command="%%PREFIX%%/bin/${name}"
> > pidfile="/var/run/${name}.pid"
> > required_files="/etc/${name}.conf"
> 
> I missed required_files in my editing of the original script.
> 
> If refdbd does have a configuration file, changes this to point to the
> correct file, otherwise this can be removed.
> 
> > extra_commands="reload"
> >
> > load_rc_config $name
> > run_rc_command "$1"
> >
> > Place the above in textproc/refdb/files/refdb.in, then add:
> >
> > USE_RC_SUBR= refdbd
> >
> > in textproc/refdb/Makefile.
> >
> 

It seems to me, that when a port installs a script appended with "*.sh" in etc/rc.d/, the
script gets executed anyway - regardless wether the service is enabled
in /etc/rc.conf[.local] or not. This is especially the case for the original port
textproc/refdb.

The reason why especially one particular machine rejected the startup of the service was:
I changed the script's name from refdb.sh to refdb and with the lack of the correct
syntax and definitions inside it, the system (11.0 CURRENT) did not start the service
while the other systems running refdb used the oldstyle refdb.sh script.

Just for the conclusion of the obscure (at least for me) behaviour.

Thanks for your time,

Oliver

Received on Wed Sep 10 2014 - 08:19:30 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:52 UTC