Proposal: multi-instance and self-contained rc.d script
Warner Losh
imp at bsdimp.com
Mon Jul 1 19:13:36 UTC 2013
On Jul 1, 2013, at 12:47 PM, Warren Block wrote:
> On Mon, 1 Jul 2013, Warner Losh wrote:
>
>>
>> On Jul 1, 2013, at 12:27 PM, Eitan Adler wrote:
>>
>>> On Mon, Jul 1, 2013 at 3:25 PM, Warren Block <wblock at wonkity.com> wrote:
>>>> '/etc/rc.d/routed manpage' would return the generated mdoc code.
>>>> '/etc/rc.d/routed help' could pipe that output to man.
>>>
>>> We should discourage directly running rc.d scripts and should instead
>>> encourage people to use the service(1) interface.
>>>
>>> +1 for both ideas though: they both sound like a very good direction to go in.
>>
>> I just need a tcsh magic command to make command completion work with service. :)
>
> Like this?
>
> 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=({fast,one,force,}{start,stop,reload,restart,status,rcvar,jailstatus,poll})
complete service 'c/-/(e l r v)/' \
'p/1/`service -l`/' \
'n/*/$_service/'
Warner
More information about the freebsd-rc
mailing list