Bug 248449 - sysutils/consul: Error in /usr/local/etc/rc.d/consul
Summary: sysutils/consul: Error in /usr/local/etc/rc.d/consul
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Steve Wills
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-03 11:40 UTC by stephan
Modified: 2020-08-16 13:18 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (swills)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stephan 2020-08-03 11:40:04 UTC
Starting consul-1.7.4 with /usr/local/etc/rc.d/consul fails if consul_group is not set in /etc/rc.conf.

In that case, when calling "/usr/local/etc/rc.d/consul start", output coming from "install" shows that install is not called correctly.

As soon as consul_group is set, the error disappears and consul starts.
Comment 1 Steve Wills freebsd_committer 2020-08-03 11:58:00 UTC
I believe this was fixed in r541347, but to be sure, can you share the error you're getting?
Comment 2 stephan 2020-08-16 08:26:59 UTC
I am very sorry, Steve, I completely missed that you had answered so quickly.

Complete way to reproduce:

1. Create an empty FBSD 12.1 jail (I used pot for that):

pot create -p consultest -b 12.1 -t single

2. Connected to the jail

3. Installed consul:

pkg install -y consul
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        consul: 1.7.4

Number of packages to be installed: 1
...

4. sysrc consul_enable="YES"

5. Start consul (shown with complete output):

/usr/local/etc/rc.d/consul start
usage: install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 file2
       install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 ... fileN directory
       install -dU [-vU] [-g group] [-m mode] [-N dbdir] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               directory ...
usage: install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 file2
       install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 ... fileN directory
       install -dU [-vU] [-g group] [-m mode] [-N dbdir] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               directory ...
usage: install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 file2
       install [-bCcpSsUv] [-f flags] [-g group] [-m mode] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               [-B suffix] [-l linkflags] [-N dbdir]
               file1 ... fileN directory
       install -dU [-vU] [-g group] [-m mode] [-N dbdir] [-o owner]
               [-M log] [-D dest] [-h hash] [-T tags]
               directory ...
/usr/local/etc/rc.d/consul: WARNING: failed precmd routine for consul

6. Add consul_group to /etc/rc.conf:

echo consul_group="wheel" >> /etc/rc.conf

7. Now starting consul works (again with complete output):

/usr/local/etc/rc.d/consul start
Starting consul.

8. Hope that helps :-)
Comment 3 Steve Wills freebsd_committer 2020-08-16 13:18:03 UTC
Thanks for confirming. I have MFH'd the fix for this. The updated package, which also includes the update to 1.8.0, should be available in a few days. Please retest and re-open if you still have an issue, closing for now.