Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Dec 2011 09:21:56 +0000
From:      Chris Rees <crees@freebsd.org>
To:        Maxim Ignatenko <gelraen.ua@gmail.com>
Cc:        freebsd-rc@freebsd.org
Subject:   Re: conf/163508: [rc.subr] [patch] Add &quot;enable&quot; and &quot;disable&quot; commands to rc.subr
Message-ID:  <CADLo838xeD_Q0EGLF8yJyVmvY-Cny=LvXUe5%2BfOJ_P0XabRO2w@mail.gmail.com>
In-Reply-To: <201112250720.pBP7KCjL015178@freefall.freebsd.org>
References:  <201112250720.pBP7KCjL015178@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 25 December 2011 07:20, Maxim Ignatenko <gelraen.ua@gmail.com> wrote:
> The following reply was made to PR conf/163508; it has been noted by GNAT=
S.
>
> From: Maxim Ignatenko <gelraen.ua@gmail.com>
> To: Doug Barton <dougb@freebsd.org>
> Cc: bug-followup@freebsd.org
> Subject: Re: conf/163508: [rc.subr] [patch] Add &quot;enable&quot; and
> =A0&quot;disable&quot; commands to rc.subr
> Date: Sun, 25 Dec 2011 09:15:44 +0200
>
> =A0On 24 December 2011 22:59, Doug Barton <dougb@freebsd.org> wrote:
> =A0> On 12/24/2011 04:20, Maxim Ignatenko wrote:
> =A0>> The idea was to make enabling/disabling services less error-prone.
> =A0>
> =A0> How is adding foo_enable=3D1 to rc.conf error-prone?
> =A0>
>
> =A0Typo like fooo_enbale=3D1, or one missed '>' in echo foo_enable=3D1 > =
/etc/rc.conf

Let's think about this in a historical way...

We (the BSDs) with our rcng have a massive advantage over the horrors
of configuring a SysV init system; has anyone recently tried to change
the 'runlevel' of a service on Debian without using rc-update? It
involves putting numbered symlinks into each rcX.d

We don't have this problem, it's as simple as adding a line to
/etc/rc.conf(:?local)?.

Yes, other systems have rc-update and cool magic like that, but our
system is SO much simpler that these just aren't necessary.  It's not
a case of being error-prone;

BSD:

# echo 'foo_enable=3D"YES"' >>/etc/rc.conf

SysV:

# for runlevel in 1 2 3 4 5 ; do ln -s /etc/init.d/foo
/etc/rc${runlevel}.d/S22foo ; done

Chris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo838xeD_Q0EGLF8yJyVmvY-Cny=LvXUe5%2BfOJ_P0XabRO2w>