summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Hendrikx (whyscream) <tom@whyscream.net>2012-01-06 20:55:37 +0000
committerTom Hendrikx (whyscream) <tom@whyscream.net>2012-01-06 20:55:37 +0000
commit504d92eddfd4bdf5a1ae0c320dc5937bb0054534 (patch)
treea2286e668f9acdf3b6c313ef2a7acbe1521c46c6 /net-dns/nsd/files/nsd.initd
parentx11-misc/webilder: New Ebuild for bug 291057 (diff)
downloadsunrise-504d92eddfd4bdf5a1ae0c320dc5937bb0054534.tar.gz
sunrise-504d92eddfd4bdf5a1ae0c320dc5937bb0054534.tar.bz2
sunrise-504d92eddfd4bdf5a1ae0c320dc5937bb0054534.zip
net-dns/nsd: correct $extra_commands usage
svn path=/sunrise/; revision=12633
Diffstat (limited to 'net-dns/nsd/files/nsd.initd')
-rw-r--r--net-dns/nsd/files/nsd.initd16
1 files changed, 9 insertions, 7 deletions
diff --git a/net-dns/nsd/files/nsd.initd b/net-dns/nsd/files/nsd.initd
index cc64bd11e..c9c687fb1 100644
--- a/net-dns/nsd/files/nsd.initd
+++ b/net-dns/nsd/files/nsd.initd
@@ -1,9 +1,10 @@
#!/sbin/runscript
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
#
-extra_commands="reload"
+extra_commands="rebuild"
+extra_started_commands="reload"
description="NSD is an authoritative only, high performance, open source name server"
description_reload="Rebuild zone database and reload it"
@@ -49,18 +50,19 @@ _patch() {
fi
}
-_rebuild() {
+rebuild() {
+ ebegin "Rebuilding NSD zone database"
if ! ${my_nsdc} rebuild > /dev/null; then
eerror "There was an error rebuilding the database. Please review your zone files."
return 1
fi
- return 0
+ eend $?
}
start() {
ebegin "Starting NSD"
_checkconf || return 1
- _checkdb || _rebuild || return 1
+ _checkdb || rebuild || return 1
${my_nsdc} start
${my_nsdc} running
eend $?
@@ -74,9 +76,9 @@ stop() {
}
reload() {
- ebegin "Rebuilding and reloading NSD zone database"
_checkconf || return 1
- _rebuild || return 1
+ rebuild || return 1
+ ebegin "Reloading NSD zone database"
${my_nsdc} reload
eend $?
}