From owner-freebsd-questions@FreeBSD.ORG Wed Sep 16 20:44:30 2009 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 787AC106566C for ; Wed, 16 Sep 2009 20:44:30 +0000 (UTC) (envelope-from fsb@thefsb.org) Received: from smtp124.iad.emailsrvr.com (smtp124.iad.emailsrvr.com [207.97.245.124]) by mx1.freebsd.org (Postfix) with ESMTP id 50ADF8FC14 for ; Wed, 16 Sep 2009 20:44:30 +0000 (UTC) Received: from relay2.r2.iad.emailsrvr.com (localhost [127.0.0.1]) by relay2.r2.iad.emailsrvr.com (SMTP Server) with ESMTP id C08C844C04B; Wed, 16 Sep 2009 16:44:29 -0400 (EDT) Received: by relay2.r2.iad.emailsrvr.com (Authenticated sender: fsb-AT-thefsb.org) with ESMTPSA id 44EF944C07E; Wed, 16 Sep 2009 16:44:28 -0400 (EDT) User-Agent: Microsoft-Entourage/12.10.0.080409 Date: Wed, 16 Sep 2009 16:44:27 -0400 From: Tom Worster To: Matthew Seaman Message-ID: Thread-Topic: passing options thru '/etc/rc.d/foo start' Thread-Index: Aco3Dns6dBtaYQCutEyfhvgMUoYw9g== In-Reply-To: <4AB13A52.1010006@infracaninophile.co.uk> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Cc: FreeBSD Mailing List Subject: Re: passing options thru '/etc/rc.d/foo start' 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: Wed, 16 Sep 2009 20:44:30 -0000 On 9/16/09 3:19 PM, "Matthew Seaman" wrote: > Tom Worster wrote: >> is there a general shell syntax that can be used to pass arguments to a >> daemon that you're starting with the /etc/rc.d/foo start command? > > If you're starting service foo, then you should be able to define command > arguments by setting foo_flags="-a -b -c". This is a convention, and > particular > services may use several more specific variables to build a command line > or may simply ignore any flags variable completely, so you'll have to check > each case individually. > >> for example, how does one start sshd using /etc/rc.d/sshd and pass it >> '-o X11Forwarding=no' without touching a config file? > > In this case, setting sshd_flags will work as sshd uses the default rc > start function. hi matthew, i tried this and couldn't make it work before i emailed my question. then mel answered that the /etc/rc.d/foo scripts ignore environment. and then, looking closer at man pages, i got the impression that perhaps only /etc/rc uses the foo_flags variables when it invokes /etc/rc.d/foo scripts. tom