|
|
|
@ -18472,9 +18472,39 @@ in LDAP")%zoneName)
|
|
|
|
|
self.clVars.Set("sr_dns_net_allow", allowNet ,True)
|
|
|
|
|
return allowNet
|
|
|
|
|
|
|
|
|
|
def checkSDBLDAP(self):
|
|
|
|
|
"""Проверка ключа sdb-ldap bind"""
|
|
|
|
|
pathBind = "/var/db/pkg/net-dns"
|
|
|
|
|
if os.path.exists(pathBind):
|
|
|
|
|
subPathsBind = filter(lambda x: "bind" in x, os.listdir("."))
|
|
|
|
|
if subPathsBind:
|
|
|
|
|
pathsUSE = (os.path.join(pathBind,subPathsBind,"IUSE"),
|
|
|
|
|
os.path.join(pathBind,subPathsBind,"USE"))
|
|
|
|
|
if filter(lambda x: not os.path.exists(x), pathsUSE):
|
|
|
|
|
return False
|
|
|
|
|
for pathUSE in pathsUSE:
|
|
|
|
|
flagFound = False
|
|
|
|
|
try:
|
|
|
|
|
FD = open(pathUSE)
|
|
|
|
|
useFlags = FD.read()
|
|
|
|
|
FD.close()
|
|
|
|
|
except:
|
|
|
|
|
break
|
|
|
|
|
if not "sdb-ldap" in useFlags:
|
|
|
|
|
break
|
|
|
|
|
flagFound = True
|
|
|
|
|
if flagFound:
|
|
|
|
|
return True
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
def setupDnsServer(self, options):
|
|
|
|
|
"""Начальная настройка DNS сервиса"""
|
|
|
|
|
# Проверка ключа bind sdb-ldap
|
|
|
|
|
if not self.checkSDBLDAP():
|
|
|
|
|
self.printERROR(_('Can not found USE="sdb-ldap" in package bind'))
|
|
|
|
|
self.printWARNING(_('Key USE="sdb-ldap" added to the package \
|
|
|
|
|
net-dns/bind version>=9.6.1'))
|
|
|
|
|
return False
|
|
|
|
|
# Принудительная установка
|
|
|
|
|
forceOptions = False
|
|
|
|
|
if options.has_key("f"):
|
|
|
|
|