Steven Moore wrote:
> Netgear DG834G.
> It's works excellently with all the computers in the house, all macs 1
> wireless, 2 wired and 1 sb wired. It's just the sb that gives the
> trouble.
> As I said power cycling the router every morning 'cured' the problem.
>
>
My Draytek has some problems where things start getting slow after a
while (the SB's keep running fine though).
I hacked up a little Perl script to reboot it nightly through the telnet
interface.
Regards,
Peter
#!/usr/bin/perl
use Net::Telnet ();
use strict;
use warnings;
my $t = new Net::Telnet (Timeout => 10, Port => 23, Prompt => '/\>/' );
$t->open("vigor");
$t->waitfor('/Password:/');
$t->print("secret\n");
$t->waitfor('/>/');
print vigorcmd( $t, 'sys reboot' );
sub vigorcmd {
my( $obj, $cmd ) = @_;
my $r;
$t->print("$cmd\n");
while ( my $s = $t->getline() ) {
$s =~ s/[\r\n]+//g;
last if $s =~ /^>\s*$/;
$r .= "$s\n";
}
return $r;
}
_______________________________________________
discuss mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/discuss