Zone transfer changing the zone name

Michael Kjorling michael at kjorling.com
Tue Feb 19 18:25:28 UTC 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The problem with this approach (removing all $ORIGIN lines) is that it
might remove origin information that is required for the zone to be
properly interpreted. It would be better to simply sed away the zone
name using a regexp:

s/zonename\.net\.(\s+;.*)?$//g

I haven't tested that one but you get the idea.


Michael Kjörling
PS. Are you having problems with MIME encoding?


On Feb 19 2002 10:17 -0800, WebReactor Networks wrote:

> You could also use named-xfer instead of dig.  It will transfer the
> zone info without duplication the SOA.  You will then need to remove
> the $ORIGIN, test and write it to your new zone file.  Something
> like what Michael Kj%F6rling proposes:
>
>   $ named-xfer -z tb.opi1.it. -f /tmp/tb.opi1.it.$$ bohrdns1.tb.opi1.it.
>   $ grep -v '$ORIGIN' /tmp/db.zone.with_origin.$$ > /tmp/db.zone.no_origin.$$
>   $ named-checkzone tb.opi1.it /tmp/db.zone.no_origin.$$ && ( mv /tmp/db.zone.no_origin.$$ /[bind_root]/tb.opi1.it; ndc reload tb.opi1.it.)
>   $ rm /tmp/db.zone.*_origin.$$
>
> I can't see any way around scripting a little bit.

- -- 
Michael Kjörling  --  Programmer/Network administrator  ^..^
Internet: michael at kjorling.com -- FidoNet: 2:204/254.4   \/
PGP: 95f1 074d 336d f8f0 f297 6a5b 2aa3 7bfd 8a70 e33e

``And indeed people sometimes speak of man's "bestial" cruelty, but
this is very unfair and insulting to the beasts: a beast can never be
so cruel as a man, so ingeniously, so artistically cruel.''
(Ivan Karamazov, in Dostoyevsky's 'The Brothers Karamazov')

*** Thinking about sending me spam? Take a close look at
*** http://michael.kjorling.com/spam/ before doing so.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Public key is at http://michael.kjorling.com/contact/pgp.html

iD8DBQE8cpiaKqN7/Ypw4z4RAiAjAJ90g56aPh9sT8zUNof3AVIRDMrluQCfTvPb
lr0WlsuWFC9ybVeZODPMw5s=
=fZsj
-----END PGP SIGNATURE-----




More information about the bind-users mailing list