From 41feec685899333cc0590f2a53219244ac56703a Mon Sep 17 00:00:00 2001 From: gutosie Date: Sun, 27 Nov 2022 19:59:23 +0200 Subject: [PATCH] Update tools.py --- NeoBoot/files/tools.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/NeoBoot/files/tools.py b/NeoBoot/files/tools.py index 235199b..feda6da 100644 --- a/NeoBoot/files/tools.py +++ b/NeoBoot/files/tools.py @@ -155,10 +155,12 @@ class MBTools(Screen): def updateList(self): self.list = [] mypath = '' + LinkNeoBoot + '' - if not fileExists('/tmp/.testneo') and getCheckActivateVip() == getBoxMacAddres() and fileExists('/usr/lib/periodon/.kodn') and not fileExists('/etc/.nameneo '): - os.system(("chattr -i /usr/lib/periodon/.activatedmac; mv /tmp/.mymac /usr/lib/periodon/.activatedmac; chattr +i /usr/lib/periodon/.activatedmac; touch /tmp/.testneo ")) - elif not fileExists('/tmp/.testneo') and fileExists('/usr/lib/periodon/.kodn') and fileExists('/etc/.nameneo '): - os.system(("chattr -i /usr/lib/periodon/.activatedmac; mv /tmp/.mymac /usr/lib/periodon/.activatedmac; chattr +i /usr/lib/periodon/.activatedmac; touch /tmp/.testneo ")) + if not fileExists('/etc/.nameneo'): + if not fileExists('/tmp/.testneo') and getCheckActivateVip() == getBoxMacAddres() and fileExists('/usr/lib/periodon/.kodn'): + os.system(("chattr -i /usr/lib/periodon/.activatedmac; mv /tmp/.mymac /usr/lib/periodon/.activatedmac; chattr +i /usr/lib/periodon/.activatedmac; touch /tmp/.testneo ")) + elif fileExists('/etc/.nameneo'): + if not fileExists('/tmp/.testneo') and fileExists('/usr/lib/periodon/.kodn') : + os.system(("cp -r /etc/.nameneo /tmp/.mymac; chattr -i /usr/lib/periodon/.activatedmac; mv /tmp/.mymac /usr/lib/periodon/.activatedmac; chattr +i /usr/lib/periodon/.activatedmac; touch /tmp/.testneo ")) if not fileExists(mypath + 'icons'): mypixmap = '' + LinkNeoBoot + '/images/ok.png' png = LoadPixmap(mypixmap)