>

Using Git for DNS and DHCP Config Files

# sudo yum install git-core
# git init
Initialized empty Git repository in /.git/
# git add /var/named/chroot/var/named/zones/*
# git commit -m 'Added DNS zone files'

[master (root-commit) a8418bf] Added DNS zone files
Committer: root <root@liminf03.motion.com>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

git config –global user.name “Your Name”
git config –global user.email you@example.com

After doing this, you may fix the identity used for this commit with:

git commit –amend –reset-author

3 files changed, 160 insertions(+)
create mode 100644 var/named/chroot/var/named/zones/internal/10.1.10.zone
create mode 100644 var/named/chroot/var/named/zones/internal/motion.com.zone
create mode 100644 var/named/chroot/var/named/zones/named.ca

# git add /var/named/chroot/etc/named.conf
# git commit -m 'Added named config file'

master 3f4fed2] Added named config file
Committer: root <root@liminf03.motion.com>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

git config –global user.name “Your Name”
git config –global user.email you@example.com

After doing this, you may fix the identity used for this commit with:

git commit –amend –reset-author

1 file changed, 49 insertions(+)
create mode 100644 var/named/chroot/etc/named.conf

# git config --global user.name "root"
# git config --global user.email root@motion.com
# git commit --amend --reset-author

[master d57a9a4] Added named config file
1 file changed, 49 insertions(+)
create mode 100644 var/named/chroot/etc/named.conf

# cd /etc
# git add dhcpd.conf
# git commit -m "Added DHCP server config file"

[master b1cd264] Added DHCP server config file’
1 file changed, 49 insertions(+)
create mode 100644 etc/dhcpd.conf

banner ad

Comments are closed.