LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   DNS Configuration Package(s) (https://www.linuxquestions.org/questions/linux-software-2/dns-configuration-package-s-4175559209/)

DelMab 11-18-2015 11:00 AM

DNS Configuration Package(s)
 
Hi guys

We have slave DNS servers that use configurations that have been manually added to each of them.
So that we can easily reconfigure the salves, these configurations should be converted into a package which can then be installed on any machine.
The package will have to be created in a package server.
The minimum amount of data that will be required will be:
 DEBIAN/control metadata file
 usr/share/doc/<package-name>/changelog.Debian.gz
 the required configuration files in etc/bind9.
NOTE: If bind9 includes the files in etc/bind in the package, you will have to tell dpkg to move them out of the way using dpkg-divert.

del@ns2:/etc/bind$ ls -l
total 52
-rw-r--r-- 1 root root 2389 Sep 3 01:40 bind.keys
-rw-r--r-- 1 root root 237 Sep 3 01:40 db.0
-rw-r--r-- 1 root root 271 Sep 3 01:40 db.127
-rw-r--r-- 1 root root 237 Sep 3 01:40 db.255
-rw-r--r-- 1 root root 353 Sep 3 01:40 db.empty
-rw-r--r-- 1 root root 270 Sep 3 01:40 db.local
-rw-r--r-- 1 root root 3048 Sep 3 01:40 db.root
-rw-r--r-- 1 root bind 463 Sep 3 01:40 named.conf
-rw-r--r-- 1 root bind 490 Sep 3 01:40 named.conf.default-zones
-rwxr-xr-x 1 root bind 2186 Oct 28 12:05 named.conf.local
-rw-r--r-- 1 root bind 482 Nov 3 10:13 named.conf.options
-rw-r----- 1 bind bind 77 Oct 26 16:14 rndc.key
-rw-r--r-- 1 root root 1317 Sep 3 01:40 zones.rfc1918

I think I need prerm, preinst and postinst scripts here.
I only need help on using dpkg-diver please
Many thanks

zhjim 11-20-2015 04:07 AM

I read up on dpkg-divert and it seems like its not the best way to handle config files. At least this page tells at the bottom: https://www.debian.org/doc/debian-po...iversions.html.
Seems like on should use http://debathena.mit.edu/config-package-dev/. But this uses dpkg-divert under the hood as well. Whatever this gives.

Just in case you might want to go another route: think about cfengine or puppet to change config files on a bigger scale.

Did you hit any roadblocks yet? How far did you go?


All times are GMT -5. The time now is 07:34 PM.