Bug 251504

Summary: sysutils/bsdstats: grep: /usr/local/etc/bsdstats.conf: No such file or directory" on startup
Product: Ports & Packages Reporter: Marcin Cieślak <saper>
Component: Individual Port(s)Assignee: Steve Wills <swills>
Status: New ---    
Severity: Affects Only Me CC: scrappy, swills, vvd
Priority: --- Flags: bugzilla: maintainer-feedback? (scrappy)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
proposed patch swills: maintainer-approval? (scrappy)

Description Marcin Cieślak 2020-12-01 10:32:48 UTC

    
Comment 1 Marcin Cieślak 2020-12-01 10:39:20 UTC
A freshly installed bsdstats package should not greet the user with an error message on startup:

grep: /usr/local/etc/bsdstats.conf: No such file or directory


Configuration:

> grep bsdstats /etc/rc.conf
bsdstats_enable="YES"

> grep stat /etc/periodic.conf   
daily_status_smart_devices="/dev/ada0"
# 410.status-uucp
daily_status_uucp_enable="YES"			# Check uucp status


Easy to reproduce from the command line:

> sudo sh /usr/local/etc/periodic/monthly/300.statistics start
Posting OS statistics to rpt.bsdstats.org ... SUCCESS
Posting device statistics to rpt.bsdstats.org ... SUCCESS
Posting CPU information to rpt.bsdstats.org ... SUCCESS
grep: /usr/local/etc/bsdstats.conf: No such file or directory
Posting port statistics to rpt.bsdstats.org ... SUCCESS
Comment 2 VVD 2020-12-01 12:20:47 UTC
(In reply to Marcin Cieślak from comment #1)
# touch /usr/local/etc/bsdstats.conf
# service bsdstats start
Starting bsdstats.
Posting OS statistics to rpt.bsdstats.org (through TOR) ... SUCCESS
Posting device statistics to rpt.bsdstats.org (through TOR) ... SUCCESS
Posting CPU information to rpt.bsdstats.org (through TOR) ... SUCCESS
Posting port statistics to rpt.bsdstats.org (through TOR) ... BSDstats failed: ports submission request failed
/usr/local/etc/rc.d/bsdstats: WARNING: failed to start bsdstats
Comment 3 VVD 2020-12-01 12:24:29 UTC
(In reply to VVD from comment #2)
# rm /usr/local/etc/bsdstats.conf
# service bsdstats start
Starting bsdstats.
Posting OS statistics to rpt.bsdstats.org (through TOR) ... SUCCESS
Posting device statistics to rpt.bsdstats.org (through TOR) ... SUCCESS
Posting CPU information to rpt.bsdstats.org (through TOR) ... SUCCESS
grep: /usr/local/etc/bsdstats.conf: No such file or directory
Posting port statistics to rpt.bsdstats.org (through TOR) ... SUCCESS
Comment 4 Steve Wills freebsd_committer 2020-12-18 04:31:53 UTC
Created attachment 220685 [details]
proposed patch

This might fix it.