From owner-freebsd-rc@FreeBSD.ORG Mon Jul 1 19:13:36 2013 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D2FB7FE1 for ; Mon, 1 Jul 2013 19:13:36 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-gh0-f175.google.com (mail-gh0-f175.google.com [209.85.160.175]) by mx1.freebsd.org (Postfix) with ESMTP id 97D971CC3 for ; Mon, 1 Jul 2013 19:13:36 +0000 (UTC) Received: by mail-gh0-f175.google.com with SMTP id z19so2103331ghb.20 for ; Mon, 01 Jul 2013 12:13:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=3m7yr5V5rjoNQhmpB/fV2ySkzn6Tiy572yehNszJ4V0=; b=Ujvd0EHup+kc91X7eVYeLJpg4RnfetTbILxyBmZrndlBVteQikJkawW/DS5jNnbs4r fhrxx/IPu/+4LWTaBegtz8gFgQEnV0zexrCWveIP0QFUr+RtqDNDS1Wco+wVVZOs5j53 +jqApUUxR6yYRK4Ndjmi1YLmcKTnDiY/Y6RHlQ+MTiCIIRFqWhDu/4mi60/udI4HVKCh 3nV4TYPZ0Iwp9esZqQjl+8om8dFLJFhMkYQcpkMLfZTrXnbodYS+hHZwjfMOH29d4L1h Dvbhe85qJoQiKbrTlc2jQ4V2RHp7DrK5ELlE9UE6CbXxfIt8RsKmAweBDezmiItB7nCW bV4w== X-Received: by 10.236.19.38 with SMTP id m26mr8719263yhm.113.1372706010010; Mon, 01 Jul 2013 12:13:30 -0700 (PDT) Received: from monkey-bot.int.fusionio.com ([209.117.142.2]) by mx.google.com with ESMTPSA id m63sm26027633yhb.10.2013.07.01.12.13.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 01 Jul 2013 12:13:29 -0700 (PDT) Sender: Warner Losh Subject: Re: Proposal: multi-instance and self-contained rc.d script Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Mon, 1 Jul 2013 13:13:25 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <154C0FE2-C895-4C65-98D7-59BED731E91E@bsdimp.com> References: <20130701.062953.1443190655468739608.hrs@allbsd.org> <20130630221032.GB43309@stack.nl> <6E2CC3DE-E77E-4ECB-AA14-B90BAD2DFB3E@bsdimp.com> To: Warren Block X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQmMPB7fiLcaAP0H1cBJLmCzXAY6AI0OcZV4XD1knsIhMNvcccqcFahjmJ13ffwXV35f5oGx Cc: freebsd-rc@freebsd.org X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jul 2013 19:13:36 -0000 On Jul 1, 2013, at 12:47 PM, Warren Block wrote: > On Mon, 1 Jul 2013, Warner Losh wrote: >=20 >>=20 >> On Jul 1, 2013, at 12:27 PM, Eitan Adler wrote: >>=20 >>> On Mon, Jul 1, 2013 at 3:25 PM, Warren Block = wrote: >>>> '/etc/rc.d/routed manpage' would return the generated mdoc code. >>>> '/etc/rc.d/routed help' could pipe that output to man. >>>=20 >>> We should discourage directly running rc.d scripts and should = instead >>> encourage people to use the service(1) interface. >>>=20 >>> +1 for both ideas though: they both sound like a very good direction = to go in. >>=20 >> I just need a tcsh magic command to make command completion work with = service. :) >=20 > Like this? >=20 > complete service 'c/-/(e l r v)/' \ > 'p/1/`service -l`/' \ > 'n/*/(start stop reload restart status rcvar = onestart onestop)/' That works, as does the more complicated: set = _service=3D({fast,one,force,}{start,stop,reload,restart,status,rcvar,jails= tatus,poll}) complete service 'c/-/(e l r v)/' \ 'p/1/`service -l`/' \ 'n/*/$_service/' Warner=