diff options
author | jvdias <jvdias@fedoraproject.org> | 2006-03-07 04:25:38 +0000 |
---|---|---|
committer | jvdias <jvdias@fedoraproject.org> | 2006-03-07 04:25:38 +0000 |
commit | 0cd02aa18f76fca3a52a81df26804036142b80f2 (patch) | |
tree | 50113d49e103cbfa315b4aa95de5be0053b309c2 /named.init | |
parent | b3f861a9645ba094769c7e2ba0cee5c4ac596ff5 (diff) | |
download | bind-0cd02aa18f76fca3a52a81df26804036142b80f2.tar.gz bind-0cd02aa18f76fca3a52a81df26804036142b80f2.tar.xz bind-0cd02aa18f76fca3a52a81df26804036142b80f2.zip |
- replace caching-nameserver with bind-config sub-packagebind-9_3_2-6
- fix bug 181730: fix creation of named user & gid
- fix bug 177595: handle case where $ROOTDIR is a link in initscript
- fix bug 177001: bind-config creates symlinks OK now
- fix bug 176388: named.conf is now never replaced by any RPM
- fix bug 176246: remove unecessary creation of rpmsave links
- fix bug 174925: no replacement of named.conf
- fix bug 173963: existing named.conf never modified
- major .spec file cleanup
Diffstat (limited to 'named.init')
-rwxr-xr-x | named.init | 24 |
1 files changed, 21 insertions, 3 deletions
@@ -19,7 +19,13 @@ [ -r /etc/sysconfig/named ] && . /etc/sysconfig/named -[ -n "$ROOTDIR" ] && ROOTDIR=`echo $ROOTDIR | sed 's#//*#/#g;s#/$##'` +if [ -n "$ROOTDIR" ]; then + ROOTDIR=`echo $ROOTDIR | sed 's#//*#/#g;s#/$##'`; + rdl=`/usr/bin/readlink $ROOTDIR`; + if [ -n "$rdl" ]; then + ROOTDIR="$rdl"; + fi; +fi RETVAL=0 named='named' @@ -42,8 +48,20 @@ nmdcOption() fi; done; } -named_conf=`nmdcOption $OPTIONS`; -[ -r ${ROOTDIR}/${named_conf:-etc/named.conf} ] || exit 1 + +named_c_option=`nmdcOption $OPTIONS`; +named_conf=${named_c_option:-etc/named.conf}; + +if [ ! -r ${named_conf} ] ; then + if [ -z "$named_c_option" ] && [ -r ${ROOTDIR}/etc/named.caching-nameserver.conf ]; then + named_conf='/etc/named.caching-nameserver.conf'; + OPTIONS="$OPTIONS -c ${named_conf}"; + else + echo Locating $ROOTDIR/${named_conf} failed: + failure + echo; + fi; +fi; start() { # Start daemons. |