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

O. Hartmann ohartman at zedat.fu-berlin.de
Wed Sep 10 10:19:31 UTC 2014


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20140910/f9c5be49/attachment.sig>


More information about the freebsd-ports mailing list