The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
Scripts / handy tips
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 rate limiting port fetches on freebsd >= 5.3
Author: LM 
Date:   01-02-05 15:12

If you needs limiting ports fetch rate on freebsd 5.3 or later, then downloading wget from ports/ftp/wget/ and using this script:
$cat /usr/local/scripts/wgetscript.sh

#!/bin/sh
/usr/local/bin/wget --limit-rate=10000 $2

and add to you /etc/make.conf next string:

FETCH_CMD="/usr/local/scrpits/wgetscript.sh

Reply To This Message
 
 Re: rate limiting port fetches on freebsd >= 5.3
Author: Dan 
Date:   01-02-05 15:19

I think this may work on 4.* as well.

--
Webmaster

Reply To This Message
 
 Re: rate limiting port fetches on freebsd >= 5.3
Author: Dan 
Date:   02-02-05 14:09

The original poster also sent me this script:

#!/usr/bin/perl
$sz=@ARGV;
for($i=0;$i<$sz;$i++)
{
$url=@ARGV[$i];
if($url =~ m/(https?|ftp):\/\//i) {
`/usr/local/bin/wget --limit-rate=10000 $url`;
exit;


But it seems to be missing some }

--
Webmaster

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org