Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Dec 2006 00:24:02 GMT
From:      Mikko Tyolajarvi<mbsd@pacbell.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/106284: bsdstats intiialization delay unneccessary
Message-ID:  <200612040024.kB40O2cF075290@www.freebsd.org>
Resent-Message-ID: <200612040030.kB40UDwj066786@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         106284
>Category:       ports
>Synopsis:       bsdstats intiialization delay unneccessary
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 04 00:30:12 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Mikko Tyolajarvi
>Release:        6.2-PRERELEASE
>Organization:
>Environment:
FreeBSD antec.home 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #16: Sun Nov 12 13:24:30 PST 2006     mikko@antec.home:/x/usr/obj/usr/src/sys/ANTEC  i386
>Description:
If one follow the pkg-message of bsdstats and execute
/usr/ports/sysutils/bsdstats/pkg-install to set up reporting,
there is up to 10 minutes of delay after answering 'y' to the
last prompt.  The delay is not really needed when running this
manual reporting (as opposed to when running from cron) and
may make the user wonder what on earth is going on.

I suggest the delay be removed in this case.
>How-To-Repeat:
Install bsdports, run the suggested command:

PKG_PREFIX="/usr/local" /bin/sh /usr/ports/sysutils/bsdstats/pkg-install bsdstats-5.0 POST-INSTALL

Answer 'y' to all questions.  Then wait...
>Fix:
diff -ru /usr/ports/sysutils/bsdstats/files/300.statistics bsdstats/files/300.statistics
--- /usr/ports/sysutils/bsdstats/files/300.statistics	Fri Dec  1 05:30:45 2006
+++ bsdstats/files/300.statistics	Sun Dec  3 16:12:48 2006
@@ -402,7 +402,7 @@
       ARCH=`/usr/bin/uname -m`
       OS=`/usr/bin/uname -s`
       get_id_token
-      sleep `random`
+      test X"$1" = X-nodelay || sleep `random`
       enable_token
       report_system
       echo "Posting monthly OS statistics to $checkin_server"
diff -ru /usr/ports/sysutils/bsdstats/pkg-install bsdstats/pkg-install
--- /usr/ports/sysutils/bsdstats/pkg-install	Fri Dec  1 05:30:45 2006
+++ bsdstats/pkg-install	Sun Dec  3 16:14:33 2006
@@ -44,7 +44,7 @@
                     echo "monthly_statistics_report_ports=\"YES\"" >> /etc/periodic.conf
                 fi
                 if yesno "Would you like to run it now" y; then
-                   /usr/local/etc/periodic/monthly/300.statistics
+                   /usr/local/etc/periodic/monthly/300.statistics -nodelay
                 fi
             fi
         fi
@@ -58,7 +58,7 @@
                 echo "monthly_statistics_report_ports=\"YES\"" >> /etc/periodic.conf
             fi
             if yesno "Would you like to run it now" y; then
-               /usr/local/etc/periodic/monthly/300.statistics
+               /usr/local/etc/periodic/monthly/300.statistics -nodelay
             fi
         fi
     fi

>Release-Note:
>Audit-Trail:
>Unformatted:



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