From owner-freebsd-net@FreeBSD.ORG Tue Oct 28 14:40:40 2008 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 773951065675 for ; Tue, 28 Oct 2008 14:40:40 +0000 (UTC) (envelope-from r_de_sousa@yahoo.com) Received: from n4.bullet.mail.mud.yahoo.com (n4.bullet.mail.mud.yahoo.com [209.191.127.236]) by mx1.freebsd.org (Postfix) with SMTP id 428CB8FC13 for ; Tue, 28 Oct 2008 14:40:40 +0000 (UTC) (envelope-from r_de_sousa@yahoo.com) Received: from [68.142.200.226] by n4.bullet.mud.yahoo.com with NNFMP; 28 Oct 2008 14:26:49 -0000 Received: from [68.142.201.243] by t7.bullet.mud.yahoo.com with NNFMP; 28 Oct 2008 14:26:49 -0000 Received: from [127.0.0.1] by omp404.mail.mud.yahoo.com with NNFMP; 28 Oct 2008 14:26:49 -0000 X-Yahoo-Newman-Property: ymail-5 X-Yahoo-Newman-Id: 562705.93028.bm@omp404.mail.mud.yahoo.com Received: (qmail 95752 invoked by uid 60001); 28 Oct 2008 14:26:49 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Message-ID; b=bZN2vKO6tUyH0JlY9mHJ0yPRl81YqFmmO7uYBYdwnIMVAQp+LyYuUFoYJFYEMDPB/sbFnGaowbaUOBDaQQ3Md4iglHwfbJh06GXm+yfKzcnp8G8cu/+N+F/auPo+AK+L1ty0sUicgJndGQhoQhuV1UNF6sZCZD0yhAZyQiPdbR0=; X-YMail-OSG: gK2mREcVM1n0TdB4Crp0HejYAzH8Wfr.RwKr_m2BYdO.m_S3KQtKDbaQJzcp7HRcxruI4FJezNKGn75olyskUuy6isBgbmSOjKGIELzXFdw7cBqjLHBwV8ofcRYD6UhZ6zz9TeDD1GhcTALuKyv3BPAzmRTMS3Lcw86ERAPKENKK7p4x9WUgIqU3eD0tG8lw3rJhrbsLa27z_5Q- Received: from [122.109.214.56] by web45215.mail.sp1.yahoo.com via HTTP; Tue, 28 Oct 2008 07:26:48 PDT X-Mailer: YahooMailRC/1155.11 YahooMailWebService/0.7.247.3 Date: Tue, 28 Oct 2008 07:26:48 -0700 (PDT) From: Roberto de Sousa To: Henri Hennebert MIME-Version: 1.0 Message-ID: <47835.95227.qm@web45215.mail.sp1.yahoo.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org Subject: Re: NSupdate from CLI X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 14:40:40 -0000 Hi Henri,=0Athanks for the help. I have this script :=0A#!/bin/sh=0AIPADDR= =3D`ifconfig em0 | grep 'inet addr:[0-9]' | tr -s " " | cut -d" " -f3 | tr = -d "addr:"`=0Aecho "update delete host1.customer. A" >> /etc/nsupdate=0Aech= o "update delete host2.customer. CNAME" >> /etc/nsupdate=0Aecho "update add= host5.customer 86400 A $IPADDR" >> /etc/nsupdate=0Aecho "update add *.cust= omer. 38400 CNAME ns2.customer." >> /etc/nsupdate=0Aecho "show" >> /etc/nsu= pdate=0Aecho "send" >> /etc/nsupdate=0Aecho "" >> /etc/nsupdate=0A/usr/bin/= nsupdate -k Kmydns.com.+157+62440.private -d /etc/nsupdate=0A=0AHowever, w= hen i tried to run it, i got there messages :=0Aroot@admin# ./test2.sh=0Ase= rver: not found=0Azone: not found=0Aupdate: not found=0Aupdate: not found= =0Aupdate: not found=0Aupdate: not found=0Ashow: not found=0Asend: not foun= d=0A=0AIt seem that the nsupdate things still take the value from the /etc/= nsupdate even i have renamed the /etc/nsupdate to /etc/old... Do you have a= ny clue why it still referring it?=0A=0Ai also have change the test2.sh to = test3.sh and execute the script but i still got the above message.=0A=0AAny= advise will be highly appreciated.=0A=0AThank you.=0A=0ARoberto=0A=0A =0Ab= uka wainhira la hatene, buka atu hatene liu tan =0A=0Aabracos =0A=0A=0A=0A= =0A________________________________=0AFrom: Henri Hennebert =0ATo: Roberto de Sousa =0ACc: freebsd-net@freebsd.o= rg=0ASent: Wednesday, 29 October, 2008 1:17:35 AM=0ASubject: Re: NSupdate f= rom CLI=0A=0ARoberto de Sousa wrote:=0A> Hello Henri,=0A> Thank you for you= r kindness to help me on this.. I have generated the =0A> key and and edit = my named.conf as per your instruction. I have also =0A> tried your script w= hich work great. What i would like to find out more =0A> is that how to mod= ify this script so that it provides flexibility =0A> without having to spec= ify the host in the script?=0A> what i mean is that.. i could select add or= delete option from CLI and =0A> able to add any host to forward & Reversin= g Zone of my DNS from my =0A> freeBSD CLI?=0A=0A<--- clip --->=0A=0AWhat do= you thing about the attached script ? Some more check of args =0Amay be us= efull ...=0A=0AHenri=0A=0A=0A=0A Make the switch to the world's be= st email. Get Yahoo!7 Mail! http://au.yahoo.com/y7mail