From 99afd90393fa2e3c12b71b63b27e4d50c71b2792 Mon Sep 17 00:00:00 2001 From: hrngultekin Date: Sat, 7 Nov 2020 13:57:40 +0300 Subject: [PATCH] =?UTF-8?q?Yal=C4=B1dali=20kurulumda=20kullan=C4=B1c=C4=B1?= =?UTF-8?q?=20hatas=C4=B1=20i=C3=A7in=20de=C4=9Fi=C5=9Fiklik?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yali/postinstall.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/yali/postinstall.py b/yali/postinstall.py index 9a6aef5..f98dab4 100644 --- a/yali/postinstall.py +++ b/yali/postinstall.py @@ -20,7 +20,7 @@ from PyQt5.QtCore import QCoreApplication _ = QCoreApplication.translate except Exception: - _ = lambda x,y: y + _ = lambda x, y: y import yali.util import yali.users @@ -114,21 +114,25 @@ def setHostName(): def setupUsers(): if yali.util.check_link() and yali.users.PENDING_USERS: # sqfs user (pisi) remove with files - print("==== deleteUser ====") + # print("==== deleteUser ====") try: ctx.link.User.Manager["baselayout"].deleteUser(1000, True) if os.path.exists("%s/home/pisi" % ctx.consts.target_dir): os.system(" rm -rf %s/home/pisi" % ctx.consts.target_dir) except Exception as e: print("deleteUser Error: %s" % e) - print("==== deleteUser ====") + # print("==== deleteUser ====") for user in yali.users.PENDING_USERS: ctx.logger.info("User %s adding to system" % user.username) try: - print("===== user =====") - print(user.groups) - print("===== user =====") + # print("===== user =====") + # print(user.groups) + # print("===== user =====") + if yali.util.check_link(): + yali.util.start_dbus() + yali.util.comarLinkInitialized() + user_id = ctx.link.User.Manager["baselayout"].addUser(user.uid, user.username, user.realname, "", "", unicode(user.passwd), user.groups, [], []) # user_id = ctx.link.User.Manager["baselayout"].addUser( @@ -136,7 +140,7 @@ def setupUsers(): # unicode(user.passwd), user.groups, [], []) except dbus.DBusException as e: ctx.logger.error("Adding user failed") - print(e) + print("Adding user failed", e) return False else: ctx.logger.debug("New user's id is %s" % user_id)