Bug 251504 - sysutils/bsdstats: grep: /usr/local/etc/bsdstats.conf: No such file or directory" on startup
Summary: sysutils/bsdstats: grep: /usr/local/etc/bsdstats.conf: No such file or direct...
Status: New
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-12-01 10:32 UTC by Marcin Cieślak
Modified: 2021-07-14 05:04 UTC (History)
3 users (show)

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


Attachments
proposed patch (1.18 KB, patch)
2020-12-18 04:31 UTC, Steve Wills
swills: maintainer-approval? (scrappy)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.
Comment 5 scrappy 2021-07-14 05:04:42 UTC
This should be fixed in the latest version ... I've tested for it, and can't recreate ...

Please advise if you are still seeing an issue,

thx