Mercurial > hg > fD-testbed
view scripts/dns-install.sh @ 0:9e5a3c884de6
Initial import of the virtual testbed.
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Thu, 17 Jun 2010 11:00:32 +0900 |
parents | |
children |
line wrap: on
line source
#!/bin/bash -x # Check configuration file is there if [ ! -d "/home/aaa/conf/`hostname --fqdn`/dns" ]; then echo "Missing configuration files"; exit 1; fi # Display the changes echo "The following changes are applied to your host configuration" diff -Nur /etc/hosts /home/aaa/conf/`hostname --fqdn`/dns/hosts cp -f /etc/hosts /etc/hosts.bkp cp -f /home/aaa/conf/`hostname --fqdn`/dns/hosts /etc/hosts # Install the dnsmasq package if needed aptitude install dnsmasq # Copy its configuration rm -rf /etc/dnsmasq.conf.bkp /etc/dnsmasq.d.bkp mv -f /etc/dnsmasq.conf /etc/dnsmasq.conf.bkp mv -f /etc/dnsmasq.d /etc/dnsmasq.d.bkp cp -f /home/aaa/conf/`hostname --fqdn`/dns/dnsmasq.conf /etc/ cp -Rf /home/aaa/conf/`hostname --fqdn`/dns/dnsmasq.d /etc/ # Restart the dnsmasq daemon /etc/init.d/dnsmasq restart