|
|
|
@ -60,22 +60,23 @@ org.kde.kdialog.ProgressDialog'
|
|
|
|
|
if max != None:
|
|
|
|
|
self.max = max
|
|
|
|
|
self.title = title
|
|
|
|
|
self.label ="LOGINKDIALOG=%d" % os.getpid()
|
|
|
|
|
pipe = popen2.Popen4(self.execenv + " %s " % self.label +\
|
|
|
|
|
'/usr/bin/kdialog --progressbar "%s" %d' % (\
|
|
|
|
|
" "*(len(title)+20),self.max))
|
|
|
|
|
if pipe.poll() != 0:
|
|
|
|
|
time.sleep(0.5)
|
|
|
|
|
if pipe.poll() == 0:
|
|
|
|
|
self.kdialog = pipe.fromchild.readline().strip()
|
|
|
|
|
while not "org.kde.kdialog" in self.kdialog:
|
|
|
|
|
s = fout.fromchild.readline()
|
|
|
|
|
if s == "":
|
|
|
|
|
self.shutdownDialog()
|
|
|
|
|
self.kdialog = s.strip()
|
|
|
|
|
self.setTitle(self.title)
|
|
|
|
|
else:
|
|
|
|
|
self.shutdownDialog()
|
|
|
|
|
if os.system('which kdialog >/dev/null') == 0:
|
|
|
|
|
self.label ="LOGINKDIALOG=%d" % os.getpid()
|
|
|
|
|
pipe = popen2.Popen4(self.execenv + " %s " % self.label +\
|
|
|
|
|
'/usr/bin/kdialog --progressbar "%s" %d' % (\
|
|
|
|
|
" "*(len(title)+20),self.max))
|
|
|
|
|
if pipe.poll() != 0:
|
|
|
|
|
time.sleep(0.5)
|
|
|
|
|
if pipe.poll() == 0:
|
|
|
|
|
self.kdialog = pipe.fromchild.readline().strip()
|
|
|
|
|
while not "org.kde.kdialog" in self.kdialog:
|
|
|
|
|
s = fout.fromchild.readline()
|
|
|
|
|
if s == "":
|
|
|
|
|
self.shutdownDialog()
|
|
|
|
|
self.kdialog = s.strip()
|
|
|
|
|
self.setTitle(self.title)
|
|
|
|
|
else:
|
|
|
|
|
self.shutdownDialog()
|
|
|
|
|
|
|
|
|
|
def shutdownDialog(self):
|
|
|
|
|
'''Принудительно уничтожить процесс kdialog'''
|
|
|
|
@ -1019,11 +1020,12 @@ or ld_bind_dn or ld_bind_pw")
|
|
|
|
|
--set-ldap_root=%s --set-ldap_bind=%s --set-ldap_bindpw=%s -P \
|
|
|
|
|
install/6intranet" %(domain,servDn,unixDN,bindDn,bindPw)
|
|
|
|
|
self.execProg(execStr)
|
|
|
|
|
textLines = self.execProg("/etc/init.d/dbus restart", False, False)
|
|
|
|
|
if not (textLines and type(textLines) == types.ListType and\
|
|
|
|
|
"ok" in textLines[-1] or textLines and "ok" in textLines):
|
|
|
|
|
self.printWARNING(_("Error restarting /etc/init.d/dbus")+ " ...")
|
|
|
|
|
return False
|
|
|
|
|
if os.path.exists('/etc/init.d/dbus'):
|
|
|
|
|
textLines = self.execProg("/etc/init.d/dbus restart", False, False)
|
|
|
|
|
if not (textLines and type(textLines) == types.ListType and\
|
|
|
|
|
"ok" in textLines[-1] or textLines and "ok" in textLines):
|
|
|
|
|
self.printWARNING(_("Error restarting /etc/init.d/dbus")+ " ...")
|
|
|
|
|
return False
|
|
|
|
|
self.printOK(_("Computer added to domain %s")%domain + " ...")
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|