[Bug 194347] Return an error when rc service is not enabled

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 24 Jan 2023 14:32:45 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194347

Fernando ApesteguĂ­a <fernape@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|bugs@FreeBSD.org            |fernape@FreeBSD.org
             Status|New                         |Closed
                 CC|                            |fernape@FreeBSD.org
         Resolution|---                         |Works As Intended

--- Comment #1 from Fernando ApesteguĂ­a <fernape@FreeBSD.org> ---
rc is returning 0 because rc is not failing. This is one of the possible
outputs considered by the rc script and it is not an error.

Compare that with this piece of code in which a force start is issued but
somehow (the script doesn't know why), it fails:

        if ! /etc/rc.d/${_depend} forcestart; then 
                warn "Unable to force ${_depend}. It may already be running."
                return 1
        fi

-- 
You are receiving this mail because:
You are the assignee for the bug.