Skip to content

Commit

Permalink
Yalıdali kurulumda kullanıcı hatası için değişiklik
Browse files Browse the repository at this point in the history
  • Loading branch information
hrngultekin committed Nov 7, 2020
1 parent b0252fe commit 99afd90
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions yali/postinstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -114,29 +114,33 @@ 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(
# user.uid, user.username, user.realname, "", "",
# 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)
Expand Down

0 comments on commit 99afd90

Please sign in to comment.