Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Sep 2007 08:18:17 -0400
From:      "Jim Stapleton" <stapleton.41@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: problems with a rc.d script I'm creating
Message-ID:  <80f4f2b20709020518i22151b56x6a77c2f35eb6b2b0@mail.gmail.com>
In-Reply-To: <80f4f2b20709012017m181fe312s14f7d4f60f9ba295@mail.gmail.com>
References:  <80f4f2b20709012017m181fe312s14f7d4f60f9ba295@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> I haven't figured out the proper way myself, but the problem is that the
> defaults you set at top, override the rc.conf variables, because they don't
> exist yet. What I do is move load_rc_config before setting defaults. General
> order becomes:
> name=foo
> rcvar=`set_rcvar`
> load_rc_config ${name}
> foo_default=${foo_default:-"default value"}
> run_rc_command "$1"
>
> Seems to work, maybe I'll figure out the proper way once I finish reading:
> http://www.freebsd.org/doc/en_US.ISO8859-1/articles/rc-scripting/index.html

Thanks.

Putting this before anything else butt he #!/bin/sh and the intro
comments "worked" but spat out some errors.
========================================
name=akpop3d
rcvar=`set_rcvar`
load_rc_config ${name}
========================================
[root@legolas /usr/local/etc/rc.d]# ./akpop3d start
set_rcvar: not found
load_rc_config: not found
Starting akpop3d.
========================================


So, I tried putting the `. /etc/rc.subr` before that, but it didn't
even start the server (processed with no errors, and a ps -A showed no
server)


At least I have something that *works* now, even if it spews errors. Thank you.

Also, if you reply, could you please reply-all? Sorry, I have this
list in digest mode due to volume, and I can't do a proper reply that
keeps thread information without having a normal copy.

Thanks,
-Jim Stapleton



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