From owner-freebsd-questions@FreeBSD.ORG Thu Sep 17 08:44:08 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 EC9A01065670 for ; Thu, 17 Sep 2009 08:44:08 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 8462B8FC1B for ; Thu, 17 Sep 2009 08:44:08 +0000 (UTC) Received: from significant-gravitas-shortfall.thebunker.net (gateway.ash.thebunker.net [213.129.64.4]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.3/8.14.3) with ESMTP id n8H8hsY3004669 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 17 Sep 2009 09:44:02 +0100 (BST) (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.8.3 smtp.infracaninophile.co.uk n8H8hsY3004669 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infracaninophile.co.uk; s=200708; t=1253177042; bh=4yqr7y2NUgzbs7V1rqVfiaSCnt/dNE+iAsmW+cG4SYU=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Cc:Content-Type:Date:From:In-Reply-To: Message-ID:Mime-Version:References:To; z=Message-ID:=20<4AB1F6C6.3020000@infracaninophile.co.uk>|Date:=20T hu,=2017=20Sep=202009=2009:43:50=20+0100|From:=20Matthew=20Seaman= 20|Organization:=20Infracaninophi le|User-Agent:=20Thunderbird=202.0.0.23=20(X11/20090824)|MIME-Vers ion:=201.0|To:=20Tom=20Worster=20|CC:=20FreeBSD=20 Mailing=20List=20|Subject:=20Re:=20 passing=20options=20thru=20'/etc/rc.d/foo=20start'|References:=20< C6D6C66B.127F5%fsb@thefsb.org>|In-Reply-To:=20|X-Enigmail-Version:=200.95.7|OpenPGP:=20id=3D60AE908C| Content-Type:=20multipart/signed=3B=20micalg=3Dpgp-sha1=3B=0D=0A=2 0protocol=3D"application/pgp-signature"=3B=0D=0A=20boundary=3D"--- ---------enig2E12B39DEB8BEF3D0B0F554B"; b=1JbbIBGK7AzaYLlj/UIDBBAdXsKN70jrArMMF+yE3WxqA5hgX8lVWZnay9RMzbEKu QYZimSXTIX0P63Gjj96yVGSqUNKM+FISlyA2uWAcbePqkMv9ZHsw5BcBz1c2xbDUcG pFuyYKJo1uKUN3riJwFfbKkiZKmWJj+OYmeexkFc= X-Authentication-Warning: happy-idiot-talk.infracaninophile.co.uk: Host gateway.ash.thebunker.net [213.129.64.4] claimed to be significant-gravitas-shortfall.thebunker.net Message-ID: <4AB1F6C6.3020000@infracaninophile.co.uk> Date: Thu, 17 Sep 2009 09:43:50 +0100 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.23 (X11/20090824) MIME-Version: 1.0 To: Tom Worster References: In-Reply-To: X-Enigmail-Version: 0.95.7 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig2E12B39DEB8BEF3D0B0F554B" X-Virus-Scanned: clamav-milter 0.95.2 at happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VERIFIED,SPF_FAIL autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on happy-idiot-talk.infracaninophile.co.uk 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: Thu, 17 Sep 2009 08:44:09 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig2E12B39DEB8BEF3D0B0F554B Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Tom Worster wrote: > On 9/16/09 3:19 PM, "Matthew Seaman" > wrote: >=20 >> 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 comm= and >> arguments by setting foo_flags=3D"-a -b -c". This is a convention, an= d >> particular >> services may use several more specific variables to build a command li= ne >> 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=3Dno' without touching a config file? >> In this case, setting sshd_flags will work as sshd uses the default rc= >> start function. >=20 > hi matthew, >=20 > i tried this and couldn't make it work before i emailed my question. th= en > mel answered that the /etc/rc.d/foo scripts ignore environment. and the= n, > looking closer at man pages, i got the impression that perhaps only /et= c/rc > uses the foo_flags variables when it invokes /etc/rc.d/foo scripts. Uh, yeah. My tortured mental processes had somehow concluded that /etc/r= c.conf *wasn't* a config file and then I pretty much forgot to add 'in /etc/rc.c= onf' at the crucial point in what I wrote. I don't think your request is possible without editing at least one file under /etc Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. Flat 3 7 Priory Courtyard PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW, UK --------------enig2E12B39DEB8BEF3D0B0F554B Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.13 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkqx9soACgkQ3jDkPpsZ+VZlxACgp1megPaOdLT6mHUus7U6gGuK sCkAn0sVrcwH/Uqnukg/5oKZatDzbX2c =Fqti -----END PGP SIGNATURE----- --------------enig2E12B39DEB8BEF3D0B0F554B--