[Bug 290970] www/tomcat110, www/tomcat[91]*: fix rc script with /usr/sbin/service

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 12 Nov 2025 11:59:31 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290970

            Bug ID: 290970
           Summary: www/tomcat110, www/tomcat[91]*: fix rc script with
                    /usr/sbin/service
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: vvd@FreeBSD.org
          Reporter: dgeo@centrale-med.fr
             Flags: maintainer-feedback?(vvd@FreeBSD.org)
          Assignee: vvd@FreeBSD.org

Created attachment 265357
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=265357&action=edit
git diff www/tomcat*

currently, using service(8) command cannot work with tomcat rc script, because
$name is not defined.

'service -e' doesn't list /usr/local/etc/rc.d/tomcat110 as enabled when
tomcat110_enabled="YES", service -R will restart all local services but
tomcat*…

I patched the rc script to make it work here, it only lacks support for symlink
if main script's name is not enabled, and should not break any existing setup.

Another option would require to patch /usr/sbin/service to define name from
$file when not properly defined in script, but this could break things
elsewhere.

Here is the patch I apply to our poudriere setup (and yes, the added ';' is
usefull to get /usr/sbin/service's "eval" define name correctly)

Hope this helps

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