explicit use of /etc/rc.d vs service

Warren Block wblock at wonkity.com
Thu Jan 24 20:13:23 UTC 2013


On Thu, 24 Jan 2013, Eitan Adler wrote:

> On 24 January 2013 10:36, Warren Block <wblock at wonkity.com> wrote:
>> On Wed, 23 Jan 2013, Eitan Adler wrote:
>>
>>> Would anyone object to a patch which converts uses of
>>> "/etc/rc.d/daemon start" to "service daemon start" and the like?
>>> I would like to see service(1) become the standard interface to using
>>> services.
>>
>>
>> Agreed.  service(1) puts things in one place and abstracts them.  Also, it's
>> less typing and easier to autocomplete.

I did not look at this in detail, but would suggest that the unquoted 
rc.conf examples should be quoted as the preferred form:

> --- a/en_US.ISO8859-1/books/handbook/config/chapter.xml
> +++ b/en_US.ISO8859-1/books/handbook/config/chapter.xml
> @@ -679,7 +679,7 @@ HOME=/var/log
...
>     <para>It is easy to check if a service is enabled in
>       <filename>/etc/rc.conf</filename> by running the appropriate
> @@ -720,7 +720,7 @@ HOME=/var/log
>       <command>sshd</command> is in fact enabled in
>       <filename>/etc/rc.conf</filename> by running:</para>
>
> -    <screen>&prompt.root; <userinput>/etc/rc.d/sshd rcvar</userinput>
> +    <screen>&prompt.root; <userinput>service sshd rcvar</userinput>
> # sshd
> $sshd_enable=YES</screen>
>
> @@ -734,7 +734,7 @@ $sshd_enable=YES</screen>
>       <option>status</option> option is available.  For instance to
>       verify that <command>sshd</command> is actually started:</para>

Should be sshd_enable="YES" in both places.


More information about the freebsd-doc mailing list