Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jun 2018 15:51:10 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 229347] [sysutils/bsdstats] device reporting broken
Message-ID:  <bug-229347-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D229347

            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@freebsd.org
          Reporter: scrappy@hub.org
          Assignee: yuri@freebsd.org
             Flags: maintainer-feedback?(yuri@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 ...

=3D=3D=3D
*** /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=3D""
       local line
!       for line in $(${PCICONF} -l); do
         local DRIVER=3D$(echo "${line}" | ${AWK} -F\@ '{print $1}')
         local DEV=3D$(echo "${line}" | ${AWK} '{print $4}' | ${CUT} -c8-15)
         local CLASS=3D$(echo "${line}" | ${AWK} '{print $2}' | ${CUT} -c9-=
14)
         query_string=3D$query_string`echo \&dev[]=3D${DRIVER}:${DEV}:${CLA=
SS}`
!       done

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

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

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-229347-7788>