[Bug 229347] [sysutils/bsdstats] device reporting broken

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Jun 26 15:51:13 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229347

            Bug ID: 229347
           Summary: [sysutils/bsdstats] device reporting broken
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: yuri at freebsd.org
          Reporter: scrappy at hub.org
          Assignee: yuri at freebsd.org
             Flags: maintainer-feedback?(yuri at freebsd.org)

Incorrect usage of a for loop instead of while causes the query_string to be
mis-generated, causing device reports to be unparseable on the server end ...
following patch needs to be applied to fix ...

===
*** /tmp/300.statistics Mon Jun 25 04:17:01 2018
--- /usr/local/etc/periodic/monthly/300.statistics      Mon Jun 25 04:28:00
2018
***************
*** 354,365 ****
     FreeBSD|DragonFly)
       local query_string=""
       local line
!       for line in $(${PCICONF} -l); do
         local DRIVER=$(echo "${line}" | ${AWK} -F\@ '{print $1}')
         local DEV=$(echo "${line}" | ${AWK} '{print $4}' | ${CUT} -c8-15)
         local CLASS=$(echo "${line}" | ${AWK} '{print $2}' | ${CUT} -c9-14)
         query_string=$query_string`echo \&dev[]=${DRIVER}:${DEV}:${CLASS}`
!       done

       echo_begin "Posting device statistics to ${checkin_server_description}"
       do_http_request_check_status "GET"
"/scripts/report_devices.php?token=${TOKEN}&key=${KEY}$query_string" \
--- 354,368 ----
     FreeBSD|DragonFly)
       local query_string=""
       local line
!       while read line
!       do
         local DRIVER=$(echo "${line}" | ${AWK} -F\@ '{print $1}')
         local DEV=$(echo "${line}" | ${AWK} '{print $4}' | ${CUT} -c8-15)
         local CLASS=$(echo "${line}" | ${AWK} '{print $2}' | ${CUT} -c9-14)
         query_string=$query_string`echo \&dev[]=${DRIVER}:${DEV}:${CLASS}`
!       done << EOT
! $(${PCICONF} -l)
! EOT

       echo_begin "Posting device statistics to ${checkin_server_description}"
       do_http_request_check_status "GET"
"/scripts/report_devices.php?token=${TOKEN}&key=${KEY}$query_string" \
===

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


More information about the freebsd-ports-bugs mailing list