From owner-freebsd-questions Sat Jan 6 12:32: 5 2001 From owner-freebsd-questions@FreeBSD.ORG Sat Jan 6 12:32:01 2001 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from gdmckee.local (gdm.demon.co.uk [193.237.88.62]) by hub.freebsd.org (Postfix) with ESMTP id 51AC337B402 for ; Sat, 6 Jan 2001 12:32:00 -0800 (PST) Received: from [192.168.0.5] (helo=p300) by gdmckee.local with smtp (Exim 3.20 #1) id 14F00L-0001Sv-00 for freebsd-questions@FreeBSD.ORG; Sat, 06 Jan 2001 20:31:57 +0000 Message-ID: <000b01c0781f$aec46640$0500a8c0@gdmckee.local> From: "G D McKee" To: "freebsd-questions" Subject: Neoupdate Date: Sat, 6 Jan 2001 20:31:43 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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