mirror of
https://github.com/gutosie/neoboot.git
synced 2025-11-01 20:05:48 +01:00
Update tools.py
This commit is contained in:
@@ -36,7 +36,7 @@ from Tools.Testinout import getTestToTest
|
|||||||
from os import system, listdir, mkdir, chdir, getcwd, rename as os_rename, remove as os_remove, popen
|
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 os.path import dirname, isdir, isdir as os_isdir
|
||||||
from enigma import eTimer
|
from enigma import eTimer
|
||||||
from Plugins.Extensions.NeoBoot.files.stbbranding import fileCheck, getMyUUID, getNeoLocation, getImageNeoBoot, getKernelVersionString, getBoxHostName, getCPUtype, getBoxVuModel, getTunerModel, getCPUSoC, getImageATv, getBoxModelVU, getBoxMacAddres, getMountDiskSTB, getCheckActivateVip, getBoxMacAddres, getChipSetString, getNeoActivatedtest
|
from Plugins.Extensions.NeoBoot.files.stbbranding import fileCheck, getMyUUID, getNeoLocation, getImageNeoBoot, getKernelVersionString, getBoxHostName, getCPUtype, getBoxVuModel, getTunerModel, getCPUSoC, getImageATv, getBoxModelVU, getBoxMacAddres, getMountDiskSTB, getCheckActivateVip, getBoxMacAddres, getChipSetString
|
||||||
from Components.Harddisk import harddiskmanager, getProcMounts
|
from Components.Harddisk import harddiskmanager, getProcMounts
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
@@ -86,6 +86,21 @@ def getCPUtype():
|
|||||||
cpu = 'MIPS'
|
cpu = 'MIPS'
|
||||||
return cpu
|
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'):
|
if os.path.exists('/etc/hostname'):
|
||||||
with open('/etc/hostname', 'r') as f:
|
with open('/etc/hostname', 'r') as f:
|
||||||
myboxname = f.readline().strip()
|
myboxname = f.readline().strip()
|
||||||
|
|||||||
Reference in New Issue
Block a user