« Return to Thread: Solaris 10 Issues With fetch-testmsg-whitelist

Re: Solaris 10 Issues With fetch-testmsg-whitelist

by Taso N. Devetzis-3 :: Rate this Message:

Reply (Restricted by the Administrator) | View in Thread

"Taso N. Devetzis" <devetzis+dcc@...> writes:

> The following small patch resolves these issues on Solaris 10, and
> should not break anything on other systems:
>
> + Add `-e' option to `ps'
> + Tweak `sed' regexp to include TABs

I see that the mailing list strips attachments.  Since it is tiny I'll
include the patch inline (note the TAB).

I forgot to mention that this is against DCC 1.3.126.
 
Thanks,
/taso

--- fetch-testmsg-whitelist- Wed May 26 14:39:54 2010
+++ fetch-testmsg-whitelist Sat Aug 21 17:23:46 2010
@@ -71,7 +71,7 @@
 # Delay for an arbitrary, somewhat random number of seconds to try to spread
 #   the load on the HTTP server for the list. Some versions of cksum yield
 #   10 digit numbers that some versions of expr think are negative.
-RND=`ps | cksum | sed -e 's/  */ + /' -e 's/\([0-9]\{6\}\)\([0-9]\)/\1 + \2/g'`
+RND=`ps -e | cksum | sed -e 's/[ ]\{1,\}/ + /' -e 's/\([0-9]\{6\}\)\([0-9]\)/\1 + \2/g'`
 RND=`expr \( $RND \) % 123`
 sleep $RND
 
_______________________________________________
DCC mailing list      DCC@...
http://www.rhyolite.com/mailman/listinfo/dcc

 « Return to Thread: Solaris 10 Issues With fetch-testmsg-whitelist