diff --git a/NeoBoot/files/neoreboot.py b/NeoBoot/files/neoreboot.py deleted file mode 100644 index f96fbed..0000000 --- a/NeoBoot/files/neoreboot.py +++ /dev/null @@ -1,93 +0,0 @@ -# -*- coding: utf-8 -*- -# system modules - -from __future__ import print_function -#from Plugins.Extensions.NeoBoot.__init__ import _ -import codecs -from enigma import getDesktop -from Components.ActionMap import ActionMap -from Components.Label import Label -from Components.ScrollLabel import ScrollLabel -from Components.Pixmap import Pixmap -from Components.Sources.List import List -from Components.ConfigList import ConfigListScreen -from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmapAlphaTest -from Components.config import getConfigListEntry, config, ConfigYesNo, ConfigText, ConfigSelection, NoSave -from Plugins.Extensions.NeoBoot.plugin import Plugins, PLUGINVERSION, UPDATEVERSION -from Plugins.Plugin import PluginDescriptor -from Screens.Standby import TryQuitMainloop -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, fileCheck -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 getNeoLocation, getImageNeoBoot, getKernelVersionString, getBoxHostName, getCPUtype, getBoxVuModel, getTunerModel, getCPUSoC, getImageATv -import os -import time -import sys -import struct, shutil -if fileExists('/etc/vtiversion.info') or fileExists('/usr/lib/python3.8') and fileExists('/.multinfo'): - from Screens.Console import Console -else: - from Plugins.Extensions.NeoBoot.files.neoconsole import Console -LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' - -class ForceReboot(Screen): - __module__ = __name__ - skin = """ - - - - """ - - def __init__(self, session): - Screen.__init__(self, session) - self['lab1'] = Label(_('Force reboot to flash ?')) - self['key_red'] = Label(_('To reboot press red!')) - self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'back': self.close, - 'red': self.iNFO}) - - def iNFO(self): - try: - cmd = "echo -e '\n\n%s '" % _('Please wait, NeoBoot is working...') - cmd1 = 'chmod 0755 ' + LinkNeoBoot + '/files/mountpoint.sh' - cmd2 = '' + LinkNeoBoot + '/files/mountpoint.sh' - cmd3 = "echo -e '\n\n%s '" % _('NeoBoot: Force reboot to flash image now...') - cmd4 = 'sleep 8; reboot -dfhi' - self.session.open(Console, _('NeoBoot: Backu to flash!'), [cmd, - cmd1, - cmd2, - cmd3, - cmd4]) - out = open('%sImageBoot/.neonextboot' % getNeoLocation(), 'w' ) - out.write('Flash') - out.close() - self.close() - - except: - False - -def main(session, **kwargs): - try: - session.open(ForceReboot) - except: - False - - -def startSetup(menuid): - if menuid != 'setup': - return [] - return [(_('NeoReboot'), - main, - 'NeoReboot', - 50)] - -def Plugins(path, **kwargs): - global plugin_path - plugin_path = path - list = [PluginDescriptor(name=_('NeoReboot'), description=_('Force reboot to flash.'), where=PluginDescriptor.WHERE_MENU, fnc=startSetup)] - return list - - \ No newline at end of file