|
Revision 1924, 1.3 kB
(checked in by benjamin, 1 year ago)
|
adding the case when using alternc-slavedns on a machine using alternc Closes #1040
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 |
#!/bin/sh -e |
|---|
| 2 |
|
|---|
| 3 |
. /usr/share/debconf/confmodule |
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
case "$1" in |
|---|
| 7 |
configure) |
|---|
| 8 |
|
|---|
| 9 |
touch /etc/bind/slavedns.conf |
|---|
| 10 |
|
|---|
| 11 |
if [ -f /usr/share/alternc/install/etc/bind/named.conf ] |
|---|
| 12 |
then |
|---|
| 13 |
if grep -q "include \"/etc/bind/slavedns.conf\";" /usr/share/alternc/install/etc/bind/named.conf |
|---|
| 14 |
then |
|---|
| 15 |
echo "Named for AlternC already configured ..." |
|---|
| 16 |
else |
|---|
| 17 |
echo "include \"/etc/bind/slavedns.conf\";" >>/usr/share/alternc/install/etc/bind/named.conf |
|---|
| 18 |
fi |
|---|
| 19 |
fi |
|---|
| 20 |
|
|---|
| 21 |
if [ -f /etc/alternc/templates/bind/named.conf ] |
|---|
| 22 |
then |
|---|
| 23 |
if grep -q "include \"/etc/bind/slavedns.conf\";" /etc/alternc/templates/bind/named.conf |
|---|
| 24 |
then |
|---|
| 25 |
echo "Named for AlternC already configured ..." |
|---|
| 26 |
else |
|---|
| 27 |
echo "include \"/etc/bind/slavedns.conf\";" >>/etc/alternc/templates/bind/named.conf |
|---|
| 28 |
fi |
|---|
| 29 |
fi |
|---|
| 30 |
|
|---|
| 31 |
if grep -q "include \"/etc/bind/slavedns.conf\";" /etc/bind/named.conf |
|---|
| 32 |
then |
|---|
| 33 |
echo "Named already configured ..." |
|---|
| 34 |
else |
|---|
| 35 |
echo "include \"/etc/bind/slavedns.conf\";" >>/etc/bind/named.conf |
|---|
| 36 |
|
|---|
| 37 |
invoke-rc.d --quiet bind reload |
|---|
| 38 |
invoke-rc.d --quiet bind9 reload |
|---|
| 39 |
fi |
|---|
| 40 |
esac |
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
|
|---|
| 44 |
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
exit 0 |
|---|