diff options
author | Adam Tkac <atkac@fedoraproject.org> | 2010-03-01 12:55:07 +0000 |
---|---|---|
committer | Adam Tkac <atkac@fedoraproject.org> | 2010-03-01 12:55:07 +0000 |
commit | bb313467094a2c0a788d19d5b7d880eafea62f4b (patch) | |
tree | 5b4a75cd52344587557fee4d3298aad4c07ff756 /bind.spec | |
parent | 311ac6e9ab23a240dc0eb31429c02df6f6082d0c (diff) | |
download | bind-bb313467094a2c0a788d19d5b7d880eafea62f4b.tar.gz bind-bb313467094a2c0a788d19d5b7d880eafea62f4b.tar.xz bind-bb313467094a2c0a788d19d5b7d880eafea62f4b.zip |
- enable/disable chroot when bind-chroot is installed/uninstalledbind-9_7_0-2_fc14
- fix typo in the dnssec-conf trigger
Diffstat (limited to 'bind.spec')
-rw-r--r-- | bind.spec | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -449,10 +449,11 @@ if grep -Eq '/etc/(named.dnssec.keys|pki/dnssec-keys)' /etc/named.conf; then if grep -q 'dlv.isc.org.conf' /etc/named.conf; then # DLV is configured, reconfigure it to new configuration sed -i -e 's/.*dnssec-lookaside.*dlv\.isc\.org\..*/dnssec-lookaside auto;\ -bindkeys-file "\/etc\/named.iscdlv.key;"/;' /etc/named.conf +bindkeys-file "\/etc\/named.iscdlv.key";/' /etc/named.conf fi sed -i -e '/.*named\.dnssec\.keys.*/d' -e '/.*pki\/dnssec-keys.*/d' \ /etc/named.conf + /sbin/service named try-restart > /dev/null 2>&1 || :; fi %post chroot @@ -465,6 +466,10 @@ if [ "$1" -gt 0 ]; then /bin/mknod %{chroot_prefix}/dev/null c 1 3 rm -f %{chroot_prefix}/etc/localtime cp /etc/localtime %{chroot_prefix}/etc/localtime + if ! grep -q '^ROOTDIR=' /etc/sysconfig/named; then + echo 'ROOTDIR=/var/named/chroot' >> /etc/sysconfig/named + /sbin/service named try-restart > /dev/null 2>&1 || :; + fi fi; :; @@ -478,6 +483,17 @@ fi; if [ "$1" -eq 0 ]; then rm -f %{chroot_prefix}/dev/{random,zero,null} rm -f %{chroot_prefix}/etc/localtime + if grep -q '^ROOTDIR=' /etc/sysconfig/named; then + # NOTE: Do NOT call `service named try-restart` because chroot + # files will remain mounted. + START=no + [ -e /var/lock/subsys/named ] && START=yes + /sbin/service named stop > /dev/null 2>&1 || :; + sed -i -e '/^ROOTDIR=.*/d' /etc/sysconfig/named + if [ "x$START" = xyes ]; then + /sbin/service named start > /dev/null 2>&1 || :; + fi + fi fi :; @@ -632,6 +648,7 @@ rm -rf ${RPM_BUILD_ROOT} * Mon Mar 01 2010 Adam Tkac <atkac redhat com> 32:9.7.0-2 - improve automatic DNSSEC reconfiguration trigger - initscript now returns 2 in case that action doesn't exist (#523435) +- enable/disable chroot when bind-chroot is installed/uninstalled * Wed Feb 17 2010 Adam Tkac <atkac redhat com> 32:9.7.0-1 - update to 9.7.0 final |