diff options
author | Christian Ruppert <idl0r@gentoo.org> | 2011-03-03 20:18:11 +0000 |
---|---|---|
committer | Christian Ruppert <idl0r@gentoo.org> | 2011-03-03 20:18:11 +0000 |
commit | 269ea28593e0fda251bccb3bc114fb2c5b85292d (patch) | |
tree | dfb6154b7ac083cc7c72f2bbf23891317bf61557 /net-dns/bind/files | |
parent | New addition, written by me (diff) | |
download | historical-269ea28593e0fda251bccb3bc114fb2c5b85292d.tar.gz historical-269ea28593e0fda251bccb3bc114fb2c5b85292d.tar.bz2 historical-269ea28593e0fda251bccb3bc114fb2c5b85292d.zip |
Check chroot on restart.
Package-Manager: portage-2.2.0_alpha26/cvs/Linux x86_64
Diffstat (limited to 'net-dns/bind/files')
-rw-r--r-- | net-dns/bind/files/named.init-r10 | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net-dns/bind/files/named.init-r10 b/net-dns/bind/files/named.init-r10 index 99fea011d48f..3acc998d7703 100644 --- a/net-dns/bind/files/named.init-r10 +++ b/net-dns/bind/files/named.init-r10 @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/files/named.init-r10,v 1.2 2011/02/27 22:27:48 idl0r Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dns/bind/files/named.init-r10,v 1.3 2011/03/03 20:18:11 idl0r Exp $ opts="start stop reload restart checkconfig checkzones" @@ -174,6 +174,14 @@ stop() { # Workaround for now, until openrc's restart has been fixed. # openrc doesn't care about a restart() function in init scripts. if [ "${RC_CMD}" = "restart" ]; then + if [ -n "${CHROOT}" -a ${CHROOT_NOCHECK:-0} -eq 0 ]; then + check_chroot || { + eend 1 + eerror "Your chroot dir ${CHROOT} is inconsistent, please run 'emerge --config net-dns/bind' first" + return 1 + } + fi + checkconfig || { eend 1; return 1; } fi |