Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Aug 2011 17:13:07 +0900 (JST)
From:      Hiroki Sato <hrs@FreeBSD.org>
To:        d@delphij.net, delphij@delphij.net
Cc:        freebsd-rc@FreeBSD.org
Subject:   Re: [PATCH] Don't test if a service is enabled when it's required
Message-ID:  <20110821.171307.577871683705351328.hrs@allbsd.org>
In-Reply-To: <4E50B5E3.90702@delphij.net>
References:  <4E50B5E3.90702@delphij.net>

next in thread | previous in thread | raw e-mail | index | archive | help
----Security_Multipart(Sun_Aug_21_17_13_07_2011_860)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Xin LI <delphij@delphij.net> wrote
  in <4E50B5E3.90702@delphij.net>:

de> Hi,
de>
de> Currently we do a checkyesno before doing forcestatus on a service
de> that is required.  However, this way if a dependent service is enabled
de> but stopped, it would not be started.
de>
de> For instance:
de>
de> echo 'mountd_enable="YES"' >> /etc/rc.conf
de> /etc/rc.d/mountd stop
de> /etc/rc.d/nfsd stop
de> /etc/rc.d/nfsd start
de>
de> Would not start mountd.
de>
de> I'd like to propose the attached patch since it doesn't seem to be
de> necessary that we test the enable status before doing forcestatus.
de>
de> Comments?

 Looks reasonable, but if we always use forcestatus just before
 force_depend(), I think adding the status check into force_depend()
 is simpler.  The "force_depend rpcbind" will do forcestatus first,
 and then do forcestart if it is not running otherwise no-op, for
 example.

-- Hiroki

----Security_Multipart(Sun_Aug_21_17_13_07_2011_860)--
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)

iEYEABECAAYFAk5QvhMACgkQTyzT2CeTzy22/gCg2J6IuQPq9nQWj10HPAHddblw
52QAniquOIt17axDLbkLOsPLFkqDlLgm
=JBT3
-----END PGP SIGNATURE-----

----Security_Multipart(Sun_Aug_21_17_13_07_2011_860)----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110821.171307.577871683705351328.hrs>