Date: Tue, 28 Oct 2008 07:26:48 -0700 (PDT) From: Roberto de Sousa <r_de_sousa@yahoo.com> To: Henri Hennebert <hlh@restart.be> Cc: freebsd-net@freebsd.org Subject: Re: NSupdate from CLI Message-ID: <47835.95227.qm@web45215.mail.sp1.yahoo.com>
next in thread | raw e-mail | index | archive | help
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 <hlh@restart.be= >=0ATo: Roberto de Sousa <r_de_sousa@yahoo.com>=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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47835.95227.qm>