|
|
|
@ -1021,7 +1021,7 @@ conjunction with the 'login' or 'logout'")
|
|
|
|
|
self.clVars.flIniFile()
|
|
|
|
|
if not self.applyRelevanceProfiles(domain):
|
|
|
|
|
return False
|
|
|
|
|
self.reloadDBus()
|
|
|
|
|
self.restartDBus()
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def delDomain(self):
|
|
|
|
@ -1255,23 +1255,21 @@ or ld_bind_dn or ld_bind_pw")
|
|
|
|
|
self.printERROR(_("Not apply 'install/domain' profiles"))
|
|
|
|
|
return False
|
|
|
|
|
# Рестартуем dbus
|
|
|
|
|
self.reloadDBus()
|
|
|
|
|
self.restartDBus()
|
|
|
|
|
if not self.setDaemonAutostart("client"):
|
|
|
|
|
return False
|
|
|
|
|
self.printOK(_("Computer added to domain %s")%domain + " ...")
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def reloadDBus(self):
|
|
|
|
|
"""Обновление DBus"""
|
|
|
|
|
if os.path.exists('/etc/init.d/dbus'):
|
|
|
|
|
textLines = self.execProg("/etc/init.d/dbus reload", False, False)
|
|
|
|
|
if not (textLines and type(textLines) == types.ListType and\
|
|
|
|
|
"ok" in textLines[-1] or textLines and "ok" in textLines):
|
|
|
|
|
self.printWARNING(_("Error reloading /etc/init.d/dbus")+" ...")
|
|
|
|
|
def restartDBus(self):
|
|
|
|
|
"""Перезапускаем службу D-Bus"""
|
|
|
|
|
dbusDaemon = '/etc/init.d/dbus'
|
|
|
|
|
if os.path.exists(dbusDaemon):
|
|
|
|
|
if os.system(dbusDaemon + ' restart &>/dev/null') != 0:
|
|
|
|
|
self.printWARNING(_("Error restarting")+" "+dbusDaemon+" ...")
|
|
|
|
|
return False
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def removePrivateFiles(self, userHome):
|
|
|
|
|
"""Удаление приватных файлов"""
|
|
|
|
|
privateFiles = ['.kde4/share/apps/kwallet/kdewallet.kwl']
|
|
|
|
|