net-dns/bind: fix a chroot startup fail.
authorRobin H. Johnson <robbat2@gentoo.org>
Wed, 6 Jan 2016 00:36:03 +0000 (16:36 -0800)
committerRobin H. Johnson <robbat2@gentoo.org>
Wed, 6 Jan 2016 07:37:30 +0000 (23:37 -0800)
Package-Manager: portage-2.2.24

net-dns/bind/files/named.init-r13

index a320d34f30e37db57a510d22089c52d308f5ef8a..752338c43744970907994fbf27ad6b442041b879 100644 (file)
@@ -152,6 +152,10 @@ start() {
                                _mount /usr/share/GeoIP ${CHROOT}/usr/share/GeoIP -o bind
                        fi
                fi
+
+               # On initial startup, if piddir inside the chroot /var/run/named
+               # Then the .../var/run part might not exist yet
+               checkpath -q -d -o root:root -m 0755 "${piddir}/.."
        fi
 
        checkconfig || { eend 1; return 1; }
@@ -160,6 +164,7 @@ start() {
        _get_pidfile
        piddir="${PIDFILE%/*}"
        checkpath -q -d -o root:named -m 0770 "${piddir}" || {
+               eerror "Failed to create PID directory at $piddir"
                eend 1
                return 1
        }