On Wed, 2002-05-01 at 00:54, christopher j bottaro wrote:
> 
> yeah, check it out, its a little script for lauching quake3 (urban terror 
> mod).  i got a bunch of computers behind a linksys router, so each user has 
> to have a unique net_port.
> 
> SUFFIX=$(($UID % 100))
> if [ "$SUFFIX" -lt 10 ] ; then
>       NETPORT=2790${SUFFIX}
> else
>       NETPORT=279${SUFFIX}
> fi

If you run into a high instance of people with the same net_port (you
may if you're not using just one user directory), try this math instead:

VARN=$(( $RANDOM % 100 ))
NETPORT=$(( 27900 + $VARN ))

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to