freebsd-ports/net/neoupdate/files/patch-aa
James E. Housley ce0f2e976f New Port: net/neoupdate
A Perl Script to automagically update DNS at centralinfo.net or yi.org
when your IP changes, both offer free DNS services.
2001-01-09 15:19:17 +00:00

16 lines
501 B
Text

diff -ruN neoupdate.orig/neoupdate.pl neoupdate/neoupdate.pl
--- neoupdate.pl.orig Fri Dec 8 04:23:16 2000
+++ neoupdate.pl Tue Jan 9 08:16:20 2001
@@ -246,9 +246,10 @@
($device) = @_;
my(@newip,$newip,$nic);
$nic = qx(/sbin/ifconfig $device);
-@newip = grep(/^addr/, split(/\s/, $nic));
+@newip = grep(/inet /, split(/[\n\r]/, $nic));
$newip = $newip[0];
-$newip =~ s/addr://;
+$newip =~ s/\sinet //;
+$newip =~ s/ .*$//;
if ($newip =~ m/(\d+)\.(\d+)\.(\d+)\.(\d+)/){
return $newip;
}else{