[PATCH] Don't test if a service is enabled when it's required
Hiroki Sato
hrs at FreeBSD.org
Sun Aug 21 08:14:10 UTC 2011
Xin LI <delphij at delphij.net> wrote
in <4E50B5E3.90702 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-rc/attachments/20110821/1ae428f3/attachment.pgp
More information about the freebsd-rc
mailing list