Date: Sat, 6 Jan 2001 20:31:43 -0000 From: "G D McKee" <freebsd@gdmckee.com> To: "freebsd-questions" <freebsd-questions@FreeBSD.ORG> Subject: Neoupdate Message-ID: <000b01c0781f$aec46640$0500a8c0@gdmckee.local>
next in thread | raw e-mail | index | archive | help
Hi
Found a useful program to update your DNS if you are on a cable modem but
the reg ex only seems to work with Linux. Does any one know how to get it
to work with FreeBSD.
The Code that is a fault is as follows:
sub getip(){
($device) = @_;
my(@newip,$newip,$nic);
$nic = qx(/sbin/ifconfig $device);
print "$nic\n";
@newip = grep(/^addr/, split(/\s/, $nic));
$newip = $newip[0];
$newip =~ s/addr://;
if ($newip =~ m/(\d+)\.(\d+)\.(\d+)\.(\d+)/){
return $newip;
}else{
die "Aborting : Can't retrieve ip information from $device\n";
}
}
Has any one got any ideas on how to get this to work with device tun0 and a
standard nic.
G D McKee
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000b01c0781f$aec46640$0500a8c0>
