Skip site navigation (1)Skip section navigation (2)
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,
thanks for the help. I have this script :
#!/bin/sh
IPADDR=`ifconfig em0 | grep 'inet addr:[0-9]' | tr -s " " | cut -d" " -f3 | tr -d "addr:"`
echo "update delete host1.customer. A" >> /etc/nsupdate
echo "update delete host2.customer. CNAME" >> /etc/nsupdate
echo "update add host5.customer 86400 A $IPADDR" >> /etc/nsupdate
echo "update add *.customer. 38400 CNAME ns2.customer." >> /etc/nsupdate
echo "show" >> /etc/nsupdate
echo "send" >> /etc/nsupdate
echo "" >> /etc/nsupdate
/usr/bin/nsupdate  -k Kmydns.com.+157+62440.private -d /etc/nsupdate

However, when i tried to run it, i got there messages :
root@admin# ./test2.sh
server: not found
zone: not found
update: not found
update: not found
update: not found
update: not found
show: not found
send: not found

It 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 any clue why it still referring it?

i also have change the test2.sh to test3.sh and execute the script but i still got the above message.

Any advise will be highly appreciated.

Thank you.

Roberto

 
buka wainhira la hatene, buka atu hatene liu tan 

abracos 




________________________________
From: Henri Hennebert <hlh@restart.be>
To: Roberto de Sousa <r_de_sousa@yahoo.com>
Cc: freebsd-net@freebsd.org
Sent: Wednesday, 29 October, 2008 1:17:35 AM
Subject: Re: NSupdate from CLI

Roberto de Sousa wrote:
> Hello Henri,
> Thank you for your kindness to help me on this.. I have generated the 
> key and and edit my named.conf as per your instruction. I have also 
> tried your script which work great. What i would like to find out more 
> is that how to modify this script so that it provides flexibility 
> without having to specify the host in the script?
> what i mean is that.. i could select add or delete option from CLI and 
> able to add any host to forward & Reversing Zone of my DNS from my 
> freeBSD CLI?

<--- clip --->

What do you thing about the attached script ? Some more check of args 
may be usefull ...

Henri



      Make the switch to the world&#39;s best 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>