From 2b9f8a5f9f8c49a7a6455306a045a9f71483ccaf Mon Sep 17 00:00:00 2001 From: gutosie Date: Sat, 18 Dec 2021 21:26:54 +0200 Subject: [PATCH] Add files via upload --- NeoBoot/files/tools.py | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/NeoBoot/files/tools.py b/NeoBoot/files/tools.py index 3a1238a..e392410 100644 --- a/NeoBoot/files/tools.py +++ b/NeoBoot/files/tools.py @@ -1,4 +1,4 @@ -#!/usr/bin/python + #!/usr/bin/python # -*- coding: utf-8 -*- # system modules @@ -30,10 +30,11 @@ from Screens.MessageBox import MessageBox from Screens.Screen import Screen from Tools.LoadPixmap import LoadPixmap from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE, SCOPE_CURRENT_SKIN, fileExists, pathExists, createDir +from Tools.Testinout import getTestToTest from os import system, listdir, mkdir, chdir, getcwd, rename as os_rename, remove as os_remove, popen from os.path import dirname, isdir, isdir as os_isdir from enigma import eTimer -from Plugins.Extensions.NeoBoot.files.stbbranding import fileCheck, getNeoLocation, getImageNeoBoot, getKernelVersionString, getBoxHostName, getCPUtype, getBoxVuModel, getTunerModel, getCPUSoC, getImageATv, getBoxModelVU, getBoxMacAddres, getMountDiskSTB +from Plugins.Extensions.NeoBoot.files.stbbranding import fileCheck, getNeoLocation, getImageNeoBoot, getKernelVersionString, getBoxHostName, getCPUtype, getBoxVuModel, getTunerModel, getCPUSoC, getImageATv, getBoxModelVU, getBoxMacAddres, getMountDiskSTB, getCheckActivateVip, getBoxMacAddres, getChipSetString import os import time import sys @@ -91,7 +92,21 @@ def getCPUtype(): cpu = 'MIPS' return cpu +def getNeoActivatedtest(): + neoactivated = 'NEOBOOT MULTIBOOT' + if not fileExists('/.multinfo'): + if getCheckActivateVip() != getBoxMacAddres(): + neoactivated = 'Ethernet MAC not found.' + elif not fileExists('/usr/lib/periodon/.kodn'): + neoactivated = 'VIP Pin code missing.' + elif getTestToTest() != UPDATEVERSION : + neoactivated = _('Update %s is available.') % getTestToTest() + else: + if getCheckActivateVip() == getBoxMacAddres() and fileExists('/usr/lib/periodon/.kodn') and getTestToTest() == UPDATEVERSION : + neoactivated = 'NEOBOOT VIP ACTIVATED' + return neoactivated + if os.path.exists('/etc/hostname'): with open('/etc/hostname', 'r') as f: myboxname = f.readline().strip() @@ -2082,10 +2097,11 @@ class Opis(Screen): - + + """ else: skin = """ @@ -2097,9 +2113,10 @@ class Opis(Screen): - - + + + """ __module__ = __name__ @@ -2107,7 +2124,8 @@ class Opis(Screen): Screen.__init__(self, session) self['key_red'] = Label(_('Remove NeoBoot of STB')) self['key_green'] = Label(_('Instal neoobot from github')) - self['lab1'] = ScrollLabel('') + self['lab1'] = ScrollLabel('') + self['lab2'] = Label(_('' + getNeoActivatedtest() + '')) self['actions'] = ActionMap(['WizardActions', 'ColorActions', 'DirectionActions'], {'back': self.close, 'red': self.delete, 'green': self.neoinstallgithub,