summaryrefslogtreecommitdiffstats
path: root/named.init
diff options
context:
space:
mode:
authorcvsdist <cvsdist@fedoraproject.org>2004-09-09 03:34:12 +0000
committercvsdist <cvsdist@fedoraproject.org>2004-09-09 03:34:12 +0000
commit78e1f2ee016fde24daf5a90975b5ba4a6760e63b (patch)
tree7590277018d70f18b358f59f6b2bac343d3c8347 /named.init
parent761f89f6401f41c38e8326a4c5f4b51d45da7bbb (diff)
auto-import changelog data from bind-9.2.1-16.src.rpmbind-9_2_1-16RHL-9-splitRHL-8-splitRHEL-3-split
Fri Jan 24 2003 Daniel Walsh <dwalsh@redhat.com> 9.2.1-16 - Put a sleep in restart to make sure stop completes Wed Jan 22 2003 Tim Powers <timp@redhat.com> - rebuilt Tue Jan 07 2003 Daniel Walsh <dwalsh@redhat.com> 9.2.1-14 - Separate /etc/rndc.key to separate file Tue Jan 07 2003 Nalin Dahyabhai <nalin@redhat.com> 9.2.1-13 - Use openssl's pkgconfig data, if available, at build-time. Mon Jan 06 2003 Daniel Walsh <dwalsh@redhat.com> 9.2.1-12 - Fix log rotate to use service named reload - Change service named reload to give success/failure message [73770] - Fix File checking [75710] - Begin change to automatically run in CHROOT environment Tue Dec 24 2002 Daniel Walsh <dwalsh@redhat.com> 9.2.1-10 - Fix startup script to work like all others. Mon Dec 16 2002 Daniel Walsh <dwalsh@redhat.com> 9.2.1-9 - Fix configure to build on x86_64 platforms
Diffstat (limited to 'named.init')
-rwxr-xr-xnamed.init34
1 files changed, 14 insertions, 20 deletions
diff --git a/named.init b/named.init
index 5bb96db..4f7def1 100755
--- a/named.init
+++ b/named.init
@@ -14,17 +14,18 @@
# Source networking configuration.
. /etc/sysconfig/network
+RETVAL=0
+prog="named"
+
# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0
-[ -f /etc/sysconfig/named ] && . /etc/sysconfig/named
+[ -r /etc/sysconfig/named ] && . /etc/sysconfig/named
-[ -f /usr/sbin/named ] || exit 0
+[ -x /usr/sbin/named ] || exit 0
-[ -f ${ROOTDIR}/etc/named.conf ] || exit 0
+[ -r ${ROOTDIR}/etc/named.conf ] || exit 0
-RETVAL=0
-prog="named"
start() {
# Start daemons.
@@ -36,21 +37,9 @@ start() {
if [ -n "${ROOTDIR}" -a "x${ROOTDIR}" != "x/" ]; then
OPTIONS="${OPTIONS} -t ${ROOTDIR}"
fi
- # Since named doesn't return proper exit codes at the moment
- # (won't be fixed before 9.2), we can't use daemon here - emulate
- # its functionality
- base=$prog
- named -u named ${OPTIONS}
+ daemon /usr/sbin/named -u named ${OPTIONS}
RETVAL=$?
- usleep 100000
- if [ -z "`/sbin/pidof named`" ]; then
- # The child processes have died after fork()ing, e.g.
- # because of a broken config file
- RETVAL=1
- fi
- [ $RETVAL -ne 0 ] && failure $"$base startup"
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/named && success $"$base startup"
- echo
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/named
return $RETVAL
}
stop() {
@@ -72,10 +61,15 @@ rhstatus() {
}
restart() {
stop
+# wait a couple of seconds for the named to finish closing down
+ sleep 2
start
}
reload() {
+ echo -n $"Reloading $prog: "
/usr/sbin/rndc reload >/dev/null 2>&1 || /usr/bin/killall -HUP `/sbin/pidof -o %PPID named`
+ [ "$?" -eq 0 ] && success $"$prog reload" || failure $"$prog reload"
+ echo
return $?
}
probe() {
@@ -100,7 +94,7 @@ case "$1" in
restart
;;
condrestart)
- [ -f /var/lock/subsys/named ] && restart
+ [ -e /var/lock/subsys/named ] && restart
;;
reload)
reload