From owner-freebsd-questions@FreeBSD.ORG Sun Sep 2 12:18:39 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D4A216A419 for ; Sun, 2 Sep 2007 12:18:39 +0000 (UTC) (envelope-from stapleton.41@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.186]) by mx1.freebsd.org (Postfix) with ESMTP id DB8AA13C45E for ; Sun, 2 Sep 2007 12:18:38 +0000 (UTC) (envelope-from stapleton.41@gmail.com) Received: by fk-out-0910.google.com with SMTP id b27so1358292fka for ; Sun, 02 Sep 2007 05:18:17 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=FoLj6fmGEJnl/3hxSBfEP9TQsaJMoHGkmd8Q6HIhBspfhRqC18teuBVIS76xOqFpRQnwiVEpCciYMLV+ixLTk0XCuQ8PDXMTMwUjYeBfIvWS1HRt+frrSXvbH7j1bncZVf0WvBXAGnZX8qra5C8sWoHqEANi5zBmlD927PIFolo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=bGmcSCB3vyOYcew8miGchtKJzaCDEavy1GytzyvmdEHqCO/lqK+9TkTed8uDDK1Oxm4kjTjVB8/AzOKrCSKLdkhz0q4wXVzPYDXnKmV8kd2k8nBB3a8fO1NbwWQqc9TEj/wstQebq5b/CU5nSBi21kkpZ0wi84kEuUvL2LotKlk= Received: by 10.82.153.5 with SMTP id a5mr8346770bue.1188735497129; Sun, 02 Sep 2007 05:18:17 -0700 (PDT) Received: by 10.82.191.14 with HTTP; Sun, 2 Sep 2007 05:18:17 -0700 (PDT) Message-ID: <80f4f2b20709020518i22151b56x6a77c2f35eb6b2b0@mail.gmail.com> Date: Sun, 2 Sep 2007 08:18:17 -0400 From: "Jim Stapleton" To: freebsd-questions@freebsd.org In-Reply-To: <80f4f2b20709012017m181fe312s14f7d4f60f9ba295@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <80f4f2b20709012017m181fe312s14f7d4f60f9ba295@mail.gmail.com> Subject: Re: problems with a rc.d script I'm creating X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Sep 2007 12:18:39 -0000 > 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