Bugfix патч для calculate server 2.0.8

git-svn-id: http://svn.calculate.ru/overlay@1143 c91db197-33c1-4113-bf15-f8a5c547ca64
atratsevskiy
mhiretskiy 15 years ago
parent f675aa6c3d
commit 6fa68d29a8

@ -1,7 +1,8 @@
AUX bugfix-r1.patch 15315 RMD160 d1b98e91a9d74a9405ac239b7f65278795d5a4e5 SHA1 f51165d6e7a6053cb6139737525a33e40e73020b SHA256 c24009d5dce14fdd4b1ab34a3e3eebadf7818a154fb4dd08cff75684fefefc18
DIST calculate-server-2.0.6.tar.bz2 67671 RMD160 0e065a7c0fc54f18c22dc88c379bfeda954402ff SHA1 d6c914daa15d9d9482f62f63c275690d1473bc98 SHA256 e86cc9f0c6756bd7043834bf74cc484d715e364d92e076d5ca39bcdbef59f4f3
DIST calculate-server-2.0.7.tar.bz2 78994 RMD160 bc30817790120f48ede32a5a65fd3fb69d7ad5c9 SHA1 6b67921a05eeb4c5625a59012c0feb4daf143f78 SHA256 750d7731052300038b259ad94f6190bbb3e75f70b25f63d918cc3a2f74ae800f
DIST calculate-server-2.0.8.tar.bz2 81329 RMD160 321e13492e60b3cf963c9c56c56d820696f380b4 SHA1 140f822a929611e8bd9cd7ac25feccb873d0b5b7 SHA256 31b3024aae6f02edb57557403604b02266276593722f977eca3ce7152a612806
EBUILD calculate-server-2.0.6-r1.ebuild 4766 RMD160 7a33f101dc1e6b60d38f255550815cf2f3a921bf SHA1 6b6fa8a64afd6a3a3e9ac0b2512d8998b9343375 SHA256 85cee081c9f0f251667b31d9cba8e9b9a8f7b4eebc073b76d341479e9f813572
EBUILD calculate-server-2.0.7.ebuild 4764 RMD160 243b4926e9beaf2d5cf45338eddab07df5c3a1dc SHA1 27666ef42e4b0dff1c4a1cd086d1a74f579ab5e3 SHA256 c23af116ad636ac237f4b48fe6f817803b12a536fb55e5ae7a11c0abc4d88e0d
EBUILD calculate-server-2.0.8.ebuild 4764 RMD160 2cf5aca446d94a882478bd9863b56b3276c23213 SHA1 2f444f50fab4d6ae4ba84c94c38d9640362359e4 SHA256 c4b0646706e7f57e842ca471077474e0e889ca8aae29c9ea1e2fc8cf7ecd3505
EBUILD calculate-server-2.0.8-r1.ebuild 4864 RMD160 b32b7c9d94884208048428b0e33303e3ad89b91d SHA1 ebe258f64c2e6dc9964f6058328f4e2377d13fc7 SHA256 346c0a0b39dd0104f695d7b764de0d1d15caaf37c4eb8b81c3869a0ad062a3f1
EBUILD calculate-server-9999.ebuild 950 RMD160 18fb1f47e6696216c39d94ec12798a6daf3add18 SHA1 eeba81e211b68849983aedb31282a2c461468fcc SHA256 2bec9b07642102695a3170a4b7adf32253083e3e535c3f98aeb17656dd8d7a23

@ -15,7 +15,7 @@ LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
DEPEND="=sys-apps/calculate-lib-2.0.11
DEPEND="=sys-apps/calculate-lib-2.0.12
>=net-nds/openldap-2.3[-minimal]
>=sys-auth/pam_ldap-180[ssl]
>=sys-auth/nss_ldap-239
@ -26,6 +26,14 @@ DEPEND="=sys-apps/calculate-lib-2.0.11
>=net-ftp/proftpd-1.3.1[-acl,ldap,ncurses,nls,pam,radius,ssl,tcpd]
>=mail-filter/procmail-3.22"
src_unpack() {
unpack ${A}
cd "${S}"
# delete a option
epatch "${FILESDIR}/bugfix-r1.patch"
}
pkg_postinst() {
if [ -d /var/calculate/server-data/mail/imap ] || \
[ -d /var/calculate/server-data/samba/win/profiles ] || \

@ -0,0 +1,303 @@
diff -ruN calculate-server-2.0.8.orig/pym/cl_ldap.py calculate-server-2.0.8/pym/cl_ldap.py
--- calculate-server-2.0.8.orig/pym/cl_ldap.py 2009-03-17 14:29:08.000000000 +0300
+++ calculate-server-2.0.8/pym/cl_ldap.py 2009-03-30 17:44:42.000000000 +0400
@@ -393,8 +393,9 @@
def runLdapServer(self):
"""Запускает LDAP сервер"""
- textLine = self.execProg("/etc/init.d/slapd start")
- if "ok" in textLine:
+ textLines = self.execProg("/etc/init.d/slapd start", False, False)
+ if textLines and type(textLines) == types.ListType and\
+ "ok" in textLines[-1] or textLines and "ok" in textLines:
return True
else:
self.printNotOK(_("Starting LDAP")+ " ...")
@@ -402,8 +403,9 @@
def restartLdapServer(self):
"""Запускает LDAP сервер"""
- textLine = self.execProg("/etc/init.d/slapd restart")
- if "ok" in textLine:
+ textLines = self.execProg("/etc/init.d/slapd restart", False, False)
+ if textLines and type(textLines) == types.ListType and\
+ "ok" in textLines[-1] or textLines and "ok" in textLines:
return True
else:
self.printNotOK(_("Restarting LDAP")+ " ...")
@@ -411,8 +413,9 @@
def stopLdapServer(self):
"""Останавливает LDAP сервер"""
- textLine = self.execProg("/etc/init.d/slapd stop")
- if "ok" in textLine:
+ textLines = self.execProg("/etc/init.d/slapd stop", False, False)
+ if textLines and type(textLines) == types.ListType and\
+ "ok" in textLines[-1] or textLines and "ok" in textLines:
#self.printOK(_("LDAP stop")+ " ...")
return True
else:
@@ -498,8 +501,10 @@
flagError = False
for daemon in daemons:
if not self.getRunDaemons([daemon]):
- textLine = self.execProg("/etc/init.d/%s start" %(daemon))
- if not ("ok" in textLine):
+ textLines = self.execProg("/etc/init.d/%s start" %(daemon),
+ False, False)
+ if not (textLines and type(textLines) == types.ListType and\
+ "ok" in textLines[-1] or textLines and "ok" in textLines):
self.printERROR( _("Daemon %s was not started") %daemon)
flagError = True
break
@@ -581,23 +586,32 @@
flagLdap = True
elif service == "mail":
if self.getRunDaemons(["postfix"]):
- textLine = self.execProg("/etc/init.d/postfix stop")
- if not ("ok" in textLine):
+ textLines = self.execProg("/etc/init.d/postfix stop", False,
+ False)
+ if not (textLines and type(textLines) == types.ListType\
+ and "ok" in textLines[-1] or textLines and\
+ "ok" in textLines):
self.printERROR( "Postfix" + " " +
_("service is not stopped"))
flagError = True
break
if self.getRunDaemons(["dovecot"]):
- textLine = self.execProg("/etc/init.d/dovecot stop")
- if not ("ok" in textLine):
+ textLines = self.execProg("/etc/init.d/dovecot stop", False,
+ False)
+ if not (textLines and type(textLines) == types.ListType and\
+ "ok" in textLines[-1] or textLines and\
+ "ok" in textLines):
self.printERROR(str("Dovecot") + " " +
_("service is not stopped"))
flagError = True
break
elif service == "jabber":
if self.getRunService("jabber"):
- textLine = self.execProg("/etc/init.d/ejabberd stop")
- if not ("ok" in textLine):
+ textLines = self.execProg("/etc/init.d/ejabberd stop",False,
+ False)
+ if not (textLines and type(textLines) == types.ListType and\
+ "ok" in textLines[-1] or textLines and\
+ "ok" in textLines):
self.printERROR( "Ejabberd" + " " +
_("service is not stopped"))
flagError = True
@@ -616,24 +630,30 @@
break
elif service == "ftp":
if self.getRunDaemons(["proftpd"]):
- textLine = self.execProg("/etc/init.d/proftpd stop")
- if not ("ok" in textLine):
+ textLines = self.execProg("/etc/init.d/proftpd stop",False,
+ False)
+ if not (textLines and type(textLines) == types.ListType and\
+ "ok" in textLines[-1] or textLines and\
+ "ok" in textLines):
self.printERROR( "Proftpd" + " " +
_("service is not stopped"))
flagError = True
break
elif self.getRunService(service):
stopService = service
- textLine = self.execProg("/etc/init.d/%s stop" %(stopService))
- if not ("ok" in textLine):
+ textLines = self.execProg("/etc/init.d/%s stop" %(stopService),
+ False, False)
+ if not (textLines and type(textLines) == types.ListType and\
+ "ok" in textLines[-1] or textLines and "ok" in textLines):
self.printERROR( str(service) + " " +
_("service is not stopped"))
flagError = True
break
if flagLdap:
if self.getRunService('ldap'):
- textLine = self.execProg("/etc/init.d/slapd stop")
- if not ("ok" in textLine):
+ textLines = self.execProg("/etc/init.d/slapd stop",False,False)
+ if not (textLines and type(textLines) == types.ListType and\
+ "ok" in textLines[-1] or textLines and "ok" in textLines):
self.printERROR( "LDAP" + " " +
_("service is not stopped"))
flagError = True
@@ -3558,12 +3578,12 @@
_("input 'yes'") +", "+ _("if not 'no'")
if not self.dialogYesNo(messDialog):
return True
- if options.has_key("allow"):
+ if options.has_key("a"):
# Получаем от пользователя доверительные сети
if not self.getAllowNet():
return False
else:
- if options.has_key("allow"):
+ if options.has_key("a"):
# Получаем от пользователя доверительные сети
if not self.getAllowNet():
return False
@@ -3660,14 +3680,16 @@
if not (textLine == None):
self.printERROR(_("Can not create Postfix aliases") + " ...")
return False
- textLine = self.execProg("/etc/init.d/postfix start")
- if "ok" in textLine:
+ textLines = self.execProg("/etc/init.d/postfix start",False,False)
+ if textLines and type(textLines) == types.ListType and\
+ "ok" in textLines[-1] or textLines and "ok" in textLines:
self.printOK(_("Starting") + " " + "Postfix" + " ...")
else:
self.printNotOK(_("Starting") + " " + "Postfix" + " ...")
return False
- textLine = self.execProg("/etc/init.d/dovecot start")
- if "ok" in textLine:
+ textLines = self.execProg("/etc/init.d/dovecot start", False, False)
+ if textLines and type(textLines) == types.ListType and\
+ "ok" in textLines[-1] or textLines and "ok" in textLines:
self.printOK(_("Starting") + " " + "Dovecot" + " ...")
else:
self.printNotOK(_("Starting") + " " + "Dovecot" + " ...")
@@ -4332,8 +4354,9 @@
if not os.path.exists("/etc/jabber/ssl.pem"):
self.printERROR(_("Can not create Jabber certificate") + " ...")
return False
- textLine = self.execProg("/etc/init.d/ejabberd start")
- if "ok" in textLine:
+ textLines = self.execProg("/etc/init.d/ejabberd start", False, False)
+ if textLines and type(textLines) == types.ListType and\
+ "ok" in textLines[-1] or textLines and "ok" in textLines:
self.printOK(_("Starting") + " " + "Ejabberd" + " ...")
else:
self.printNotOK(_("Starting") + " " + "Ejabberd" + " ...")
@@ -4825,12 +4848,12 @@
_("input 'yes'") +", "+ _("if not 'no'")
if not self.dialogYesNo(messDialog):
return True
- if options.has_key("allow"):
+ if options.has_key("a"):
# Получаем от пользователя доверительные сети
if not self.getAllowNet():
return False
else:
- if options.has_key("allow"):
+ if options.has_key("a"):
# Получаем от пользователя доверительные сети
if not self.getAllowNet():
return False
@@ -4888,8 +4911,9 @@
self.printERROR(_("ERROR") + ": " +\
_("Can not add Samba admin password"))
return False
- textLine = self.execProg("/etc/init.d/slapd restart")
- if not "ok" in textLine:
+ textLines = self.execProg("/etc/init.d/slapd restart", False, False)
+ if not (textLines and type(textLines) == types.ListType and\
+ "ok" in textLines[-1] or textLines and "ok" in textLines):
self.printNotOK(_("LDAP restart") + " ...")
return False
#Cоединение с Ldap (администратор)
@@ -4915,8 +4939,9 @@
print _("LDAP Error") + ": " + self.ldapObj.getError().strip()
return False
self.printOK(_("Added ldif file") +" ...")
- textLine = self.execProg("/etc/init.d/samba start")
- if "ok" in textLine:
+ textLines = self.execProg("/etc/init.d/samba start", False, False)
+ if textLines and type(textLines) == types.ListType and\
+ "ok" in textLines[-1] or textLines and "ok" in textLines:
self.printOK(_("Starting") + " Samba ...")
else:
self.printNotOK(_("Starting") + " Samba ...")
@@ -5268,8 +5293,8 @@
opt = {}
if options.has_key("v"):
opt['v'] = ''
- if options.has_key("allow"):
- opt['allow'] = ''
+ if options.has_key("a"):
+ opt['a'] = ''
# Сервисы для которых не будет задаваться вопрос о доступных сетях
# при включенной опции allow
noInputAllowNetServices = []
@@ -5370,7 +5395,7 @@
if service == "samba":
# Получаем от пользователя доверительные сети
# для сервиса Samba
- if options.has_key("allow") and\
+ if options.has_key("a") and\
not service in noInputAllowNetServices:
self.servSambaObj.clVars = self.clVars
if not self.servSambaObj.getAllowNet():
@@ -5411,7 +5436,7 @@
if service == "mail":
# Получаем от пользователя доверительные сети
# для сервиса Mail
- if options.has_key("allow") and\
+ if options.has_key("a") and\
not service in noInputAllowNetServices:
self.servMailObj.clVars = self.clVars
if not self.servMailObj.getAllowNet():
@@ -7021,6 +7046,7 @@
(on/off)")
},
{'progAccess':(9,),
+ 'shortOption':"a",
'longOption':"allow",
'helpChapter':_("Mail service options"),
'help':_("enter the allowed ip addresses and network")
@@ -7040,11 +7066,13 @@
'help':_("encryption type - 'none', 'tls'")
},
{'progAccess':(9,),
+ 'shortOption':"a",
'longOption':"allow",
'helpChapter':_("Samba service options"),
'help':_("enter the allowed ip addresses and network")
},
{'progAccess':(10,),
+ 'shortOption':"a",
'longOption':"allow",
'helpChapter':_("Common options"),
'help':_("enter the allowed ip addresses and network\
@@ -7556,13 +7584,15 @@
if self.clVars.Get("sr_samba_set") == "on":
if self.getRunService('samba'):
textLines = self.execProg("/etc/init.d/samba restart",
- False,False)
- if not "ok" in textLines[-1]:
+ False, False)
+ if not (textLines and type(textLines) == types.ListType and\
+ "ok" in textLines[-1] or textLines and "ok" in textLines):
self.printNotOK(_("Restarting") + " Samba ...")
return False
else:
- textLine = self.execProg("/etc/init.d/samba start")
- if not "ok" in textLine:
+ textLines = self.execProg("/etc/init.d/samba start",False,False)
+ if not (textLines and type(textLines) == types.ListType and\
+ "ok" in textLines[-1] or textLines and "ok" in textLines):
self.printNotOK(_("Starting") + " Samba ...")
return False
# Подключаемся к LDAP cерверу
@@ -7595,12 +7625,13 @@
{"DN":self.clVars.Get("ld_ftp_dn"),
"PASS":self.clVars.Get("ld_ftp_pw")})
self.printOK(_("Added ldif file") +" ...")
+ textLines = []
if self.getRunService('ftp'):
textLines = self.execProg("/etc/init.d/proftpd restart",False,False)
- textLine = textLines[0]
else:
- textLine = self.execProg("/etc/init.d/proftpd start")
- if "ok" in textLine:
+ textLines = self.execProg("/etc/init.d/proftpd start",False,False)
+ if textLines and type(textLines) == types.ListType and\
+ "ok" in textLines[-1] or textLines and "ok" in textLines:
self.printOK(_("Starting") + " " + "Proftpd" + " ...")
else:
self.printNotOK(_("Starting") + " " + "Proftpd" + " ...")
Loading…
Cancel
Save