Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jun 2017 13:33:17 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 220227] service(8): Do not try to refer to rcvar when it is empty
Message-ID:  <bug-220227-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D220227

            Bug ID: 220227
           Summary: service(8): Do not try to refer to rcvar when it is
                    empty
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: knu@FreeBSD.org

Created attachment 183740
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D183740&action=
=3Dedit
patch for service.sh

If rcvar is not defined in a rc.d script, service(8) still tries to call
checkyesno() passing an empty string as a variable name only to see this
unmeaningful error message in /var/log/messages: "$ is not set properly - s=
ee
rc.conf(5)."

Also, name and rcvar should be initialized in case they are not defined in =
the
rc.d script, otherwise the previous values may be used for it.

"service -e" is a good way to reproduce this because it will make the comma=
nd
read all rc.d scripts found in your system.  Note that the message is not
output to stderr but to syslog, so check out /var/log/message for it.

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



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