From 8ab873f56ee65e17f36ee152b07b27135044d2af Mon Sep 17 00:00:00 2001 From: persianpros Date: Wed, 14 Apr 2021 00:13:52 +0430 Subject: [PATCH] PEP8 double aggressive W291 ~ W293 and W391 --- NeoBoot/ex_init.py | 6 +- NeoBoot/extract.py | 394 +++++----- NeoBoot/files/Harddisk.py | 24 +- NeoBoot/files/devices.py | 48 +- NeoBoot/files/neoconsole.py | 12 +- NeoBoot/files/stbbranding.py | 301 ++++---- NeoBoot/files/testinout | 62 +- NeoBoot/files/tools.py | 688 +++++++++--------- NeoBoot/neoskins/darog69/skin_darog69.py | 24 +- .../skin_darog69_Ustym4kpro.py | 6 +- NeoBoot/neoskins/default.py | 291 ++++---- NeoBoot/neoskins/mercus/mercus_skin.py | 6 +- NeoBoot/neoskins/metrix/metrix_skin.py | 84 +-- NeoBoot/neoskins/neo/neo_skin.py | 125 ++-- NeoBoot/neoskins/oldhd/hd_skin.py | 14 +- NeoBoot/plugin.py | 630 ++++++++-------- NeoBoot/tmpfiles/runpy/arm_run.py | 26 +- NeoBoot/tmpfiles/runpy/duo4k_run.py | 96 +-- NeoBoot/tmpfiles/runpy/duo4kse_run.py | 96 +-- NeoBoot/tmpfiles/runpy/mips_run.py | 37 +- NeoBoot/tmpfiles/runpy/vu4k_run.py | 6 +- NeoBoot/tmpfiles/runpy/vu_mtd1_run.py | 70 +- NeoBoot/tmpfiles/runpy/vu_mtd2_run.py | 70 +- NeoBoot/tmpfiles/runpy/zero4k_run.py | 94 +-- NeoBoot/ubi_reader_arm/ubi_extract_files.py | 6 +- NeoBoot/ubi_reader_mips/ubi_extract_files.py | 10 +- NeoBoot/ubi_reader_mips/ui/__init__.py | 1 - NeoBoot/unpack.py | 159 ++-- NeoBoot/usedskin.py | 229 +++--- 29 files changed, 1796 insertions(+), 1819 deletions(-) diff --git a/NeoBoot/ex_init.py b/NeoBoot/ex_init.py index ac54832..ce0b2f2 100644 --- a/NeoBoot/ex_init.py +++ b/NeoBoot/ex_init.py @@ -1,8 +1,8 @@ -#!/usr/bin/python - +#!/usr/bin/python + import sys import extract if len(sys.argv) < 16: pass else: - extract.NEOBootMainEx(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6], sys.argv[7], sys.argv[8], sys.argv[9], sys.argv[10], sys.argv[11], sys.argv[12], sys.argv[13], sys.argv[14], sys.argv[15], sys.argv[16]) + extract.NEOBootMainEx(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6], sys.argv[7], sys.argv[8], sys.argv[9], sys.argv[10], sys.argv[11], sys.argv[12], sys.argv[13], sys.argv[14], sys.argv[15], sys.argv[16]) diff --git a/NeoBoot/extract.py b/NeoBoot/extract.py index aa971f0..6c9843f 100644 --- a/NeoBoot/extract.py +++ b/NeoBoot/extract.py @@ -6,13 +6,13 @@ import os import struct import shutil -# ver. gutosie +# ver. gutosie #--------------------------------------------- 2021 ---------------------------------------------# -def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, LanWlan, Sterowniki, InstallSettings, ZipDelete, RepairFTP, SoftCam, MediaPortal, PiconR, Kodi, BlackHole): +def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, LanWlan, Sterowniki, InstallSettings, ZipDelete, RepairFTP, SoftCam, MediaPortal, PiconR, Kodi, BlackHole): NEOBootR(source, target, stopenigma, CopyFiles, CopyKernel, TvList, LanWlan, Sterowniki, InstallSettings, ZipDelete, RepairFTP, SoftCam, MediaPortal, PiconR, Kodi, BlackHole) - + def LanguageUsed(): language = '' @@ -30,8 +30,8 @@ def getBoxHostName(): if os.path.exists('/etc/hostname'): with open('/etc/hostname', 'r') as f: myboxname = f.readline().strip() - f.close() - return myboxname + f.close() + return myboxname def getCPUSoC(): @@ -39,19 +39,19 @@ def getCPUSoC(): if os.path.exists('/proc/stb/info/chipset'): with open('/proc/stb/info/chipset', 'r') as f: chipset = f.readline().strip() - f.close() + f.close() if chipset == '7405(with 3D)': chipset == '7405' - + return chipset - + def getBoxVuModel(): vumodel = 'UNKNOWN' if os.path.exists("/proc/stb/info/vumodel") and not os.path.exists("/proc/stb/info/boxtype"): with open('/proc/stb/info/vumodel', 'r') as f: vumodel = f.readline().strip() - f.close() + f.close() return vumodel @@ -82,14 +82,14 @@ def getNeoLocation(): locatino = f.readline().strip() f.close() return locatino - + media = getNeoLocation() mediahome = media + '/ImageBoot/' extensions_path = '/usr/lib/enigma2/python/Plugins/Extensions/' dev_null = ' > /dev/null 2>&1' supportedTuners = 'vuplus' - + def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, LanWlan, Sterowniki, InstallSettings, ZipDelete, RepairFTP, SoftCam, MediaPortal, PiconR, Kodi, BlackHole): media_target = mediahome + target @@ -120,8 +120,8 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Lan 'rmdir ' + media_target + media + dev_null, 'mkdir -p ' + media_target + media + dev_null, #'cp /etc/passwd ' + media_target + '/etc/passwd' + dev_null, -# 'cp ' + extensions_path + 'NeoBoot/bin/hdd' + media_target+'/etc/init.d/hddusb' + dev_null, - 'cp /etc/hostname ' + media_target + '/etc/hostname' + dev_null, +# 'cp ' + extensions_path + 'NeoBoot/bin/hdd' + media_target+'/etc/init.d/hddusb' + dev_null, + 'cp /etc/hostname ' + media_target + '/etc/hostname' + dev_null, 'cp -af ' + extensions_path + 'NeoBoot ' + media_target + extensions_path + 'NeoBoot' + dev_null, 'mkdir -p ' + media_target + extensions_path + 'NeoReboot' + dev_null, 'touch ' + media_target + extensions_path + 'NeoReboot/__init__.py' + dev_null, @@ -133,9 +133,9 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Lan if CopyFiles == 'False': os.system('echo "No copying of files..."') - os.system('touch ' + getNeoLocation() + 'ImageBoot/.without_copying; sleep 5') + os.system('touch ' + getNeoLocation() + 'ImageBoot/.without_copying; sleep 5') - if CopyKernel == 'True': + if CopyKernel == 'True': #mips vuplus if getBoxHostName() == 'vuultimo' or getCPUSoC() == '7405' and os.path.exists('%s/ImageBoot/%s/etc/vtiversion.info' % (media, target)): if os.path.exists('%s/ImageBoot/%s/lib/modules' % (media, target)): @@ -153,15 +153,15 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Lan cmd = 'cp -af /lib/firmware %s/ImageBoot/%s/lib > /dev/null 2>&1' % (media, target) rc = os.system(cmd) os.system('echo "Copied system drivers. Not recommended copied kernel.bin for Ultimo HD."') - elif getCPUtype() == "MIPS" and getBoxHostName() == 'vuultimo' or getBoxHostName() == 'bm750' or getBoxHostName() == 'vuduo' or getBoxHostName() == 'vuuno' or getBoxHostName() == 'vusolo' or getBoxHostName() == 'vuduo' or getBoxHostName() == 'vusolo2' or getBoxHostName() == 'vusolose' or getBoxHostName() == 'vuduo2' or getBoxHostName() == 'vuzero' or getBoxHostName() == 'mbultra': - os.system('mv ' + getNeoLocation() + 'ImagesUpload/vuplus/' + getBoxVuModel() + '/kernel_cfe_auto.bin ' + media_target + '/boot/' + getBoxHostName() + '.vmlinux.gz' + dev_null) - os.system('echo "Copied kernel.bin STB-MIPS"') + elif getCPUtype() == "MIPS" and getBoxHostName() == 'vuultimo' or getBoxHostName() == 'bm750' or getBoxHostName() == 'vuduo' or getBoxHostName() == 'vuuno' or getBoxHostName() == 'vusolo' or getBoxHostName() == 'vuduo' or getBoxHostName() == 'vusolo2' or getBoxHostName() == 'vusolose' or getBoxHostName() == 'vuduo2' or getBoxHostName() == 'vuzero' or getBoxHostName() == 'mbultra': + os.system('mv ' + getNeoLocation() + 'ImagesUpload/vuplus/' + getBoxVuModel() + '/kernel_cfe_auto.bin ' + media_target + '/boot/' + getBoxHostName() + '.vmlinux.gz' + dev_null) + os.system('echo "Copied kernel.bin STB-MIPS"') #arm vuplus arms elif getCPUtype() == "ARMv7" and getBoxHostName() == "vuultimo4k" or getBoxHostName() == "vusolo4k" or getBoxHostName() == "vuuno4k" or getBoxHostName() == "vuuno4kse" or getBoxHostName() == "vuduo4k" or getBoxHostName() == "vuduo4kse" or getBoxHostName() == "vuzero4k": os.system('mv ' + getNeoLocation() + 'ImagesUpload/vuplus/' + getBoxVuModel() + '/kernel_auto.bin ' + media_target + '/boot/zImage.' + getBoxHostName() + '' + dev_null) - os.system('echo "Copied kernel.bin STB-ARM"') - - if not os.path.exists('' + getNeoLocation() + 'ImageBoot/.without_copying'): + os.system('echo "Copied kernel.bin STB-ARM"') + + if not os.path.exists('' + getNeoLocation() + 'ImageBoot/.without_copying'): if os.path.exists('/usr/sbin/nandwrite'): cmd = 'cp -af /usr/sbin/nandwrite %s/ImageBoot/%s/usr/sbin/nandwrite > /dev/null 2>&1' % (media, target) rc = os.system(cmd) @@ -200,8 +200,8 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Lan if not os.path.exists('%s/ImageBoot/%s/usr/lib/enigma2/python/boxbranding.so' % (media, target)): cmd = 'cp -af /usr/lib/enigma2/python/boxbranding.so %s/ImageBoot/%s/usr/lib/enigma2/python/boxbranding.so > /dev/null 2>&1' % (media, target) rc = os.system(cmd) - os.system('echo "Copied plugins..."') - + os.system('echo "Copied plugins..."') + if TvList == 'True': if not os.path.exists('%s/ImageBoot/%s/etc/enigma2' % (media, target)): cmd = 'mkdir -p %s/ImageBoot/%s/etc/enigma2' % (media, target) @@ -223,7 +223,7 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Lan os.system('echo "Not copied LAN-WLAN, not recommended for this image."') elif os.path.exists('/etc/bhversion') and os.path.exists('%s/usr/lib/enigma2/python/Plugins/PLi' % (media, target)): os.system('echo "Not copied LAN-WLAN, not recommended for this image."') - else: + else: if os.path.exists('/etc/wpa_supplicant.wlan0.conf'): cmd = 'cp -af /etc/wpa_supplicant.wlan0.conf %s/ImageBoot/%s/etc/wpa_supplicant.wlan0.conf > /dev/null 2>&1' % (media, target) rc = os.system(cmd) @@ -294,23 +294,23 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Lan if SoftCam == 'True': if os.path.exists('/etc/CCcam.cfg'): - cmd = 'cp -af /etc/CCcam.cfg %s/ImageBoot/%s/etc > /dev/null 2>&1' % (media, target) - rc = os.system(cmd) + cmd = 'cp -af /etc/CCcam.cfg %s/ImageBoot/%s/etc > /dev/null 2>&1' % (media, target) + rc = os.system(cmd) if os.path.exists('/etc/tuxbox/config'): cmd = 'cp -af /etc/tuxbox/config %s/ImageBoot/%s/etc/tuxbox > /dev/null 2>&1' % (media, target) - rc = os.system(cmd) + rc = os.system(cmd) os.system('echo "Copied softcam files to the installed image..."') if MediaPortal == 'True': if os.path.exists('' + extensions_path + 'MediaPortal'): cmd = 'cp -af ' + extensions_path + 'MediaPortal %s/ImageBoot/%s/usr/lib/enigma2/python/Plugins/Extensions > /dev/null 2>&1' % (media, target) - rc = os.system(cmd) + rc = os.system(cmd) cmd = 'cp -af ' + extensions_path + 'mpgz %s/ImageBoot/%s/usr/lib/enigma2/python/Plugins/Extensions > /dev/null 2>&1' % (media, target) - rc = os.system(cmd) + rc = os.system(cmd) cmd = 'cp -af /usr/lib/python2.7/argparse.pyo %s/ImageBoot/%s/usr/lib/python2.7 > /dev/null 2>&1' % (media, target) - rc = os.system(cmd) + rc = os.system(cmd) cmd = 'cp -af /usr/lib/python2.7/robotparser.pyo %s/ImageBoot/%s/usr/lib/python2.7 > /dev/null 2>&1' % (media, target) - rc = os.system(cmd) + rc = os.system(cmd) cmd = 'cp -af /usr/lib/python2.7/site-packages/Crypto %s/ImageBoot/%s/usr/lib/python2.7/site-packages > /dev/null 2>&1' % (media, target) rc = os.system(cmd) cmd = 'cp -af /usr/lib/python2.7/site-packages/mechanize %s/ImageBoot/%s/usr/lib/python2.7/site-packages > /dev/null 2>&1' % (media, target) @@ -318,7 +318,7 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Lan cmd = 'cp -af /usr/lib/python2.7/site-packages/requests %s/ImageBoot/%s/usr/lib/python2.7/site-packages > /dev/null 2>&1' % (media, target) rc = os.system(cmd) cmd = 'cp -af /usr/lib/python2.7/site-packages/requests-2.11.1-py2.7.egg-info %s/ImageBoot/%s/usr/lib/python2.7/site-packages > /dev/null 2>&1' % (media, target) - rc = os.system(cmd) + rc = os.system(cmd) if not os.path.exists('%s/ImageBoot/%s/etc/enigma2' % (media, target)): cmd = 'mkdir -p %s/ImageBoot/%s/etc/enigma2' % (media, target) @@ -331,36 +331,36 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Lan rc = os.system(cmd) if os.path.exists('/etc/enigma2/mp_pluginliste'): cmd = 'cp /etc/enigma2/mp_pluginliste %s/ImageBoot/%s/etc/enigma2' % (media, target) - rc = os.system(cmd) + rc = os.system(cmd) os.system('echo "Copied MediaPortal..."') - elif not os.path.exists('' + extensions_path + 'MediaPortal'): + elif not os.path.exists('' + extensions_path + 'MediaPortal'): os.system('echo "MediaPortal not found."') if PiconR == 'True': if os.path.exists('/usr/share/enigma2/picon'): cmd = 'cp -af /usr/share/enigma2/picon %s/ImageBoot/%s/usr/share/enigma2' % (media, target) - rc = os.system(cmd) + rc = os.system(cmd) os.system('echo "Copied picon..."') - elif not os.path.exists('/usr/share/enigma2/picon'): - os.system('echo "Picon flash not found."') - + elif not os.path.exists('/usr/share/enigma2/picon'): + os.system('echo "Picon flash not found."') + if Kodi == 'True': cmd = 'mkdir -p %s/ImageBoot/%s/home/root/.kodi > /dev/null 2>&1' % (media, target) rc = os.system(cmd) if os.path.exists('/home/root/.kodi'): os.system('echo "Kodi set ok."') else: - if not os.path.exists('/home/root/.kodi'): + if not os.path.exists('/home/root/.kodi'): if not os.path.exists('/.multinfo'): if os.path.exists('/media/hdd/.kodi'): cmd = 'mv /media/hdd/.kodi /media/hdd/.kodi_flash; ln -sf "/media/hdd/.kodi_flash" "/home/root/.kodi"; ln -sf "/home/root/.kodi" "/media/hdd/.kodi" ' - rc = os.system(cmd) + rc = os.system(cmd) os.system('echo "Kodi fix ok."') else: os.system('echo "Kodi not found.."') - else: + else: os.system('echo "Kodi path possible only from flash."') - else: + else: os.system('echo "Kodi not found."') if BlackHole == 'True': @@ -369,8 +369,8 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Lan try: text = ver.split('-')[0] except: - text = '' - + text = '' + cmd = 'mkdir ' + getNeoLocation() + 'ImageBoot/%s/boot/blackhole' % target rc = os.system(cmd) cmd = 'cp -f ' + extensions_path + 'NeoBoot/bin/version ' + getNeoLocation() + 'ImageBoot/%s/boot/blackhole' % target @@ -416,7 +416,7 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Lan cmd = 'echo -n "\n\n/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/userscript.sh \n\nexit 0" >> %s/ImageBoot/%s/etc/rc.local' % (media, target) rc = os.system(cmd) cmd = 'chmod 0755 %s/ImageBoot/%s/etc/rc.local' % (media, target) - rc = os.system(cmd) + rc = os.system(cmd) if os.path.exists('%s/ImageBoot/%s/etc/init.d/rc.local' % (media, target)): filename = '%s/ImageBoot/%s/etc/init.d/rc.local' % (media, target) @@ -438,10 +438,10 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Lan cmd = 'chmod 0755 %s/ImageBoot/%s/etc/init.d/rc.local' % (media, target) rc = os.system(cmd) - if not os.path.exists('%s/ImageBoot/%s/etc/init.d/rc.local' % (media, target)) and not os.path.exists('%s/ImageBoot/%s/etc/rc.local' % (media, target)): - if os.path.exists('%s/ImageBoot/%s/etc/init.d' % (media, target)): + if not os.path.exists('%s/ImageBoot/%s/etc/init.d/rc.local' % (media, target)) and not os.path.exists('%s/ImageBoot/%s/etc/rc.local' % (media, target)): + if os.path.exists('%s/ImageBoot/%s/etc/init.d' % (media, target)): # cmd = 'ln -s %sImageBoot/%s/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/userscript.sh %sImageBoot/%s/etc/rcS.d/S99neo.local' % (media, -# target, +# target, # media, # target) cmd = 'cp -af /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/userscript.sh %sImageBoot/%s/etc/rcS.d/S99neo.local' % (media, target) @@ -452,16 +452,16 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Lan os.system('echo "/etc/init.d not found."') os.system('echo "Copied file neo_userscript.sh"') - if not os.path.exists('' + getNeoLocation() + 'ImageBoot/.without_copying'): + if not os.path.exists('' + getNeoLocation() + 'ImageBoot/.without_copying'): if not os.path.exists('%s/ImageBoot/%s/etc/enigma2' % (media, target)): cmd = 'mkdir -p %s/ImageBoot/%s/etc/enigma2' % (media, target) rc = os.system(cmd) cmd = 'touch %s/ImageBoot/%s/etc/enigma2/settings' % (media, target) rc = os.system(cmd) cmd = 'grep "config.Nims" /etc/enigma2/settings >> %s/ImageBoot/%s/etc/enigma2/settings' % (media, target) - rc = os.system(cmd) + rc = os.system(cmd) cmd1 = 'grep "av.videomode.DVI" /etc/enigma2/settings >> %s/ImageBoot/%s/etc/enigma2/settings' % (media, target) - rc = os.system(cmd1) + rc = os.system(cmd1) cmd2 = 'grep "config.OpenWebif" /etc/enigma2/settings >> %s/ImageBoot/%s/etc/enigma2/settings' % (media, target) rc = os.system(cmd2) cmd3 = 'grep "config.osd" /etc/enigma2/settings >> %s/ImageBoot/%s/etc/enigma2/settings' % (media, target) @@ -469,7 +469,7 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Lan cmd4 = 'grep "config.timezone.val" /etc/enigma2/settings >> %s/ImageBoot/%s/etc/enigma2/settings' % (media, target) rc = os.system(cmd4) cmd5 = 'grep "config.servicelist.startuproot" /etc/enigma2/settings >> %s/ImageBoot/%s/etc/enigma2/settings' % (media, target) - rc = os.system(cmd5) + rc = os.system(cmd5) cmd6 = 'grep "UUID=" /etc/fstab >> %s/ImageBoot/%s/etc/fstab' % (media, target) rc = os.system(cmd6) @@ -490,17 +490,17 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Lan elif line.find('/dev/mmcblk0p4') != -1: line = '#' + line elif line.find('/dev/mmcblk0p5') != -1: - line = '#' + line + line = '#' + line elif line.find('/dev/mmcblk0p6') != -1: - line = '#' + line + line = '#' + line elif line.find('/dev/mmcblk0p7') != -1: - line = '#' + line + line = '#' + line elif line.find('/dev/mmcblk0p8') != -1: - line = '#' + line + line = '#' + line elif line.find('/dev/mmcblk0p9') != -1: - line = '#' + line + line = '#' + line elif line.find('/dev/root') != -1: - line = '#' + line + line = '#' + line elif line.find('/dev/mtdblock1') != -1: line = '#' + line elif line.find('/dev/mtdblock2') != -1: @@ -510,15 +510,15 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Lan elif line.find('/dev/mtdblock4') != -1: line = '#' + line elif line.find('/dev/mtdblock5') != -1: - line = '#' + line + line = '#' + line elif line.find('/dev/mtdblock6') != -1: - line = '#' + line + line = '#' + line elif line.find('/dev/mtdblock7') != -1: - line = '#' + line + line = '#' + line elif line.find('/dev/mtdblock8') != -1: - line = '#' + line + line = '#' + line elif line.find('/dev/mtdblock9') != -1: - line = '#' + line + line = '#' + line elif line.find('/dev/root') != -1: line = '#' + line out.write(line) @@ -526,7 +526,7 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Lan f.close() out.close() os.rename(namefile2, namefile) - + tpmd = media + '/ImageBoot/' + target + '/etc/init.d/tpmd' if os.path.exists(tpmd): os.system('rm ' + tpmd) @@ -639,7 +639,7 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Lan os.rename(filename2, filename) cmd = 'chmod -R 0755 %s' % filename rc = os.system(cmd) - + # cmd = 'cp -f ' + extensions_path + 'NeoBoot/bin/hdd ' + getNeoLocation() + 'ImageBoot/%s/etc/init.d/hddusb' % target # rc = os.system(cmd) @@ -649,8 +649,8 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Lan cmd = 'cp -af /usr/lib/enigma2/python/Tools/Testinout.py ' + getNeoLocation() + 'ImageBoot/%s/usr/lib/enigma2/python/Tools/' % target rc = os.system(cmd) os.system('mkdir -p ' + media_target + '/media/hdd' + dev_null) - os.system('mkdir -p ' + media_target + '/media/usb' + dev_null) - os.system('mkdir -p ' + media_target + '/var/lib/opkg/info/' + dev_null) + os.system('mkdir -p ' + media_target + '/media/usb' + dev_null) + os.system('mkdir -p ' + media_target + '/var/lib/opkg/info/' + dev_null) os.system('touch ' + getNeoLocation() + 'ImageBoot/.data; echo "Data instalacji image" > ' + getNeoLocation() + 'ImageBoot/.data; echo " "; date > ' + getNeoLocation() + 'ImageBoot/.data') os.system('mv -f ' + getNeoLocation() + 'ImageBoot/.data ' + getNeoLocation() + 'ImageBoot/%s/.data' % target) cmd = 'touch /tmp/.init_reboot' @@ -661,65 +661,65 @@ def NEOBootMainEx(source, target, stopenigma, CopyFiles, CopyKernel, TvList, Lan os.system('cp ' + getNeoLocation() + 'ImageBoot/.neonextboot ' + getNeoLocation() + 'ImageBoot/%s/.multinfo' % target) out = open(mediahome + '.neonextboot', 'w') out.write('Flash') - out.close() + out.close() if '.tar.xz' not in source and not os.path.exists('' + getNeoLocation() + '/ImageBoot/%s/etc/issue' % target): os.system('echo ""; echo "No system installed! The reason for the installation error may be badly packed image files or it is not a system for your model."') os.system('echo "The installed system may not start. Check the correctness of the installed image directory!!!"') os.system('rm -r ' + getNeoLocation() + '/ImageBoot/%s' % target) if os.path.exists('' + getNeoLocation() + 'ubi'): - os.system('rm -r ' + getNeoLocation() + 'ubi') + os.system('rm -r ' + getNeoLocation() + 'ubi') if os.path.exists('' + getNeoLocation() + 'image_cache/'): os.system('rm -r ' + getNeoLocation() + 'image_cache') if os.path.exists('' + getNeoLocation() + 'ImageBoot/.without_copying'): - os.system('rm -f ' + getNeoLocation() + 'ImageBoot/.without_copying') + os.system('rm -f ' + getNeoLocation() + 'ImageBoot/.without_copying') rc = RemoveUnpackDirs() if os.path.exists('/tmp/init4'): os.system('rm -f /tmp/init4; init 3') os.system('echo "End of installation:"; date +%T') - os.system('echo "If you want to save the installation process from the console press green."') + os.system('echo "If you want to save the installation process from the console press green."') def RemoveUnpackDirs(): os.chdir(media + '/ImagesUpload') - if os.path.exists('' + getNeoLocation() + 'ImagesUpload/unpackedzip'): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/unpackedzip') - elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/*.bin'): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/*.bin') - elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/*.txt'): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/*.txt') + if os.path.exists('' + getNeoLocation() + 'ImagesUpload/unpackedzip'): + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/unpackedzip') + elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/*.bin'): + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/*.bin') + elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/*.txt'): + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/*.txt') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/vuplus'): rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/vuplus') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/sf4008'): rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/sf4008') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/osmio4k'): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/osmio4k') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/osmio4k') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/osmio4kplus'): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/osmio4kplus') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/osmio4kplus') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/dm900'): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/dm900') - elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/hd60'): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/hd60') - elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/hd61'): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/hd61') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/dm900') + elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/hd60'): + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/hd60') + elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/hd61'): + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/hd61') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/hd51'): rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/hd51') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/bre2ze4k'): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/bre2ze4k') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/bre2ze4k') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/multibox'): rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/multibox') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/multiboxse'): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/multiboxse') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/multiboxse') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/unforce_multibox.txt'): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/unforce_multibox.txt') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/unforce_multibox.txt') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/axas'): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/axas') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/axas') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/miraclebox'): rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/miraclebox') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/e4hd'): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/e4hd') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/e4hd') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/update'): rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/update') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/rootfs.tar.xz'): @@ -727,89 +727,89 @@ def RemoveUnpackDirs(): elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/*.nfi'): rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/*.nfi') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/zgemma'): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/zgemma') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/zgemma') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/formuler1'): rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/formuler1') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/formuler3'): rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/formuler3') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/formuler4turbo'): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/formuler4turbo') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/formuler4turbo') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/et*'): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/et*') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/et*') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/xpeedl*'): rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/xpeedl*') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/osmini'): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/osmini') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/osmini') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/xp1000 '): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/xp1000 ') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/xp1000 ') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/dinobot '): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/dinobot ') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/dinobot ') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/e2/update'): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/e2') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/e2') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/et1x000'): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/et1x000') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/et1x000') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/protek4k'): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/protek4k') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/protek4k') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/dm920 '): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/dm920 ') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/dm920 ') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/dreamtwo '): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/dreamtwo ') - elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/multibox') or os.path.exists('' + getNeoLocation() + 'ImagesUpload/multiboxse'): - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/multibox ' + getNeoLocation() + 'ImagesUpload/multibox; rm -r ' + getNeoLocation() + 'ImagesUpload/multibox') - elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/octagon/sf8008'): - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/usb_update.bin ' + getNeoLocation() + 'ImagesUpload/octagon; rm -r ' + getNeoLocation() + 'ImagesUpload/octagon') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/dreamtwo ') + elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/multibox') or os.path.exists('' + getNeoLocation() + 'ImagesUpload/multiboxse'): + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/multibox ' + getNeoLocation() + 'ImagesUpload/multibox; rm -r ' + getNeoLocation() + 'ImagesUpload/multibox') + elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/octagon/sf8008'): + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/usb_update.bin ' + getNeoLocation() + 'ImagesUpload/octagon; rm -r ' + getNeoLocation() + 'ImagesUpload/octagon') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/h7'): - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/bootargs.bin ' + getNeoLocation() + 'ImagesUpload/h7; mv ' + getNeoLocation() + 'ImagesUpload/fastboot.bin ' + getNeoLocation() + 'ImagesUpload/h7') - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/h7') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/bootargs.bin ' + getNeoLocation() + 'ImagesUpload/h7; mv ' + getNeoLocation() + 'ImagesUpload/fastboot.bin ' + getNeoLocation() + 'ImagesUpload/h7') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/h7') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/h9'): - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/bootargs.bin ' + getNeoLocation() + 'ImagesUpload/h9; mv ' + getNeoLocation() + 'ImagesUpload/fastboot.bin ' + getNeoLocation() + 'ImagesUpload/h9') - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/h9') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/bootargs.bin ' + getNeoLocation() + 'ImagesUpload/h9; mv ' + getNeoLocation() + 'ImagesUpload/fastboot.bin ' + getNeoLocation() + 'ImagesUpload/h9') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/h9') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/h9se'): - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/bootargs.bin ' + getNeoLocation() + 'ImagesUpload/h9se; mv ' + getNeoLocation() + 'ImagesUpload/fastboot.bin ' + getNeoLocation() + 'ImagesUpload/h9se') - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/h9se') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/bootargs.bin ' + getNeoLocation() + 'ImagesUpload/h9se; mv ' + getNeoLocation() + 'ImagesUpload/fastboot.bin ' + getNeoLocation() + 'ImagesUpload/h9se') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/h9se') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/i55plus'): - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/bootargs.bin ' + getNeoLocation() + 'ImagesUpload/i55plus; mv ' + getNeoLocation() + 'ImagesUpload/fastboot.bin ' + getNeoLocation() + 'ImagesUpload/i55plus') - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/i55plus') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/bootargs.bin ' + getNeoLocation() + 'ImagesUpload/i55plus; mv ' + getNeoLocation() + 'ImagesUpload/fastboot.bin ' + getNeoLocation() + 'ImagesUpload/i55plus') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/i55plus') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/h9combo'): - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/force_h9combo_READ.ME ' + getNeoLocation() + 'ImagesUpload/h9combo; mv ' + getNeoLocation() + 'ImagesUpload/unforce_h9combo.txt ' + getNeoLocation() + 'ImagesUpload/h9combo') - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/h9combo') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/force_h9combo_READ.ME ' + getNeoLocation() + 'ImagesUpload/h9combo; mv ' + getNeoLocation() + 'ImagesUpload/unforce_h9combo.txt ' + getNeoLocation() + 'ImagesUpload/h9combo') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/h9combo') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/h9combose'): - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/force_h9combose_READ.ME ' + getNeoLocation() + 'ImagesUpload/h9combo; mv ' + getNeoLocation() + 'ImagesUpload/unforce_h9combose.txt ' + getNeoLocation() + 'ImagesUpload/h9combose') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/force_h9combose_READ.ME ' + getNeoLocation() + 'ImagesUpload/h9combo; mv ' + getNeoLocation() + 'ImagesUpload/unforce_h9combose.txt ' + getNeoLocation() + 'ImagesUpload/h9combose') rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/h9combose') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/h10'): - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/force_h10_READ.ME ' + getNeoLocation() + 'ImagesUpload/h10; mv ' + getNeoLocation() + 'ImagesUpload/unforce_h10.txt ' + getNeoLocation() + 'ImagesUpload/h10') - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/h10') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/force_h10_READ.ME ' + getNeoLocation() + 'ImagesUpload/h10; mv ' + getNeoLocation() + 'ImagesUpload/unforce_h10.txt ' + getNeoLocation() + 'ImagesUpload/h10') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/h10') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/uclan'): - if os.path.exists('' + getNeoLocation() + 'ImagesUpload/usb_update.bin'): - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/usb_update.bin ' + getNeoLocation() + 'ImagesUpload/uclan') - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/uclan') + if os.path.exists('' + getNeoLocation() + 'ImagesUpload/usb_update.bin'): + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/usb_update.bin ' + getNeoLocation() + 'ImagesUpload/uclan') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/uclan') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/beyonwiz'): - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/apploader.bin ' + getNeoLocation() + 'ImagesUpload/beyonwiz') - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/bootargs.bin ' + getNeoLocation() + 'ImagesUpload/beyonwiz') - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/fastboot.bin ' + getNeoLocation() + 'ImagesUpload/beyonwiz') - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/beyonwiz') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/apploader.bin ' + getNeoLocation() + 'ImagesUpload/beyonwiz') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/bootargs.bin ' + getNeoLocation() + 'ImagesUpload/beyonwiz') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/fastboot.bin ' + getNeoLocation() + 'ImagesUpload/beyonwiz') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/beyonwiz') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/amiko'): - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/usb_update.bin ' + getNeoLocation() + 'ImagesUpload/amiko') - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/apploader.bin ' + getNeoLocation() + 'ImagesUpload/amiko') - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/bootargs.bin ' + getNeoLocation() + 'ImagesUpload/amiko') - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/fastboot.bin ' + getNeoLocation() + 'ImagesUpload/amiko') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/usb_update.bin ' + getNeoLocation() + 'ImagesUpload/amiko') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/apploader.bin ' + getNeoLocation() + 'ImagesUpload/amiko') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/bootargs.bin ' + getNeoLocation() + 'ImagesUpload/amiko') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/fastboot.bin ' + getNeoLocation() + 'ImagesUpload/amiko') rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/amiko') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/gigablue'): - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/usb_update.bin ' + getNeoLocation() + 'ImagesUpload/gigablue') - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/apploader.bin ' + getNeoLocation() + 'ImagesUpload/gigablue') - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/bootargs.bin ' + getNeoLocation() + 'ImagesUpload/gigablue') - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/fastboot.bin ' + getNeoLocation() + 'ImagesUpload/gigablue') - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/gigablue') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/usb_update.bin ' + getNeoLocation() + 'ImagesUpload/gigablue') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/apploader.bin ' + getNeoLocation() + 'ImagesUpload/gigablue') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/bootargs.bin ' + getNeoLocation() + 'ImagesUpload/gigablue') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/fastboot.bin ' + getNeoLocation() + 'ImagesUpload/gigablue') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/gigablue') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/gigablue'): - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/usb_update.bin ' + getNeoLocation() + 'ImagesUpload/gigablue') - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/apploader.bin ' + getNeoLocation() + 'ImagesUpload/gigablue') - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/bootargs.bin ' + getNeoLocation() + 'ImagesUpload/gigablue') - rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/fastboot.bin ' + getNeoLocation() + 'ImagesUpload/gigablue') - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/gigablue') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/usb_update.bin ' + getNeoLocation() + 'ImagesUpload/gigablue') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/apploader.bin ' + getNeoLocation() + 'ImagesUpload/gigablue') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/bootargs.bin ' + getNeoLocation() + 'ImagesUpload/gigablue') + rc = os.system('mv ' + getNeoLocation() + 'ImagesUpload/fastboot.bin ' + getNeoLocation() + 'ImagesUpload/gigablue') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/gigablue') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/rootfs.tar.gz'): rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.gz') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/rootfs.tar.xz'): - rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.xz') + rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.xz') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/rootfs.tar.bz2'): rc = os.system('rm -r ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.bz2') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/et10000'): @@ -821,7 +821,7 @@ def NEOBootExtract(source, target, ZipDelete): os.system('echo "Press green to hide Console or red to abort the installation\nInstallation started:"; date +%T;echo "Extracting the installation file..."') if os.path.exists('' + getNeoLocation() + 'ImageBoot/.without_copying'): - os.system('rm -f ' + getNeoLocation() + 'ImageBoot/.without_copying') + os.system('rm -f ' + getNeoLocation() + 'ImageBoot/.without_copying') if os.path.exists('' + getNeoLocation() + 'image_cache'): os.system('rm -rf ' + getNeoLocation() + 'image_cache') @@ -829,7 +829,7 @@ def NEOBootExtract(source, target, ZipDelete): sourcefile2 = media + '/ImagesUpload/%s.nfi' % source sourcefile3 = media + '/ImagesUpload/%s.rar' % source sourcefile4 = media + '/ImagesUpload/%s.gz' % source - + #Instalacja *.nfi if os.path.exists(sourcefile2) is True: if sourcefile2.endswith('.nfi'): @@ -850,13 +850,13 @@ def NEOBootExtract(source, target, ZipDelete): if os.path.exists(sourcefile3) is True: if sourcefile3.endswith('.rar'): os.system('echo "Installing iamge x.rar..."') - cmd = 'unrar e ' + sourcefile3 + ' ' + getNeoLocation() + 'ImagesUpload/ > /dev/null 2>&1' + cmd = 'unrar e ' + sourcefile3 + ' ' + getNeoLocation() + 'ImagesUpload/ > /dev/null 2>&1' rc = os.system(cmd) if ZipDelete == 'True': rc = os.system('rm -rf ' + sourcefile3) else: os.system('echo "NeoBoot keep the file: %s for reinstallation."' % sourcefile3) - + #Instalacja *.zip elif os.path.exists(sourcefile) is True: os.system('unzip ' + sourcefile) @@ -864,7 +864,7 @@ def NEOBootExtract(source, target, ZipDelete): os.system('rm -rf ' + sourcefile) #Instalacja MIPS - if getCPUtype() == 'MIPS': + if getCPUtype() == 'MIPS': if os.path.exists('' + getNeoLocation() + 'ubi') is False: rc = os.system('mkdir ' + getNeoLocation() + 'ubi') to = '' + getNeoLocation() + 'ImageBoot/' + target @@ -881,7 +881,7 @@ def NEOBootExtract(source, target, ZipDelete): mtdfile = '/dev/mtd' + str(i) if os.path.exists(mtdfile) is False: break - + mtd = str(i) os.chdir(media + '/ImagesUpload') #zgemma @@ -1011,14 +1011,14 @@ def NEOBootExtract(source, target, ZipDelete): if os.path.exists('' + getNeoLocation() + 'ImagesUpload/vuplus/zero'): os.chdir('zero') rootfname = 'root_cfe_auto.bin' - + #osmini if os.path.exists('' + getNeoLocation() + 'ImagesUpload/osmini'): os.chdir('osmini') brand = 'osmini' - #Instalacja image nandsim - os.system('echo "Instalacja - nandsim w toku..."') + #Instalacja image nandsim + os.system('echo "Instalacja - nandsim w toku..."') rc = os.system('insmod /lib/modules/' + getKernelVersion() + '/kernel/drivers/mtd/nand/nandsim.ko cache_file=' + getNeoLocation() + 'image_cache first_id_byte=0x20 second_id_byte=0xaa third_id_byte=0x00 fourth_id_byte=0x15;sleep 5')#% getKernelVersion()) cmd = 'dd if=%s of=/dev/mtdblock%s bs=2048' % (rootfname, mtd) rc = os.system(cmd) @@ -1030,7 +1030,7 @@ def NEOBootExtract(source, target, ZipDelete): rc = os.system(cmd) rc = os.system('umount ' + getNeoLocation() + 'ubi') cmd = 'ubidetach -m %s' % mtd - rc = os.system(cmd) + rc = os.system(cmd) rc = os.system('rmmod nandsim') rc = os.system('rm ' + getNeoLocation() + 'image_cache') @@ -1042,7 +1042,7 @@ def NEOBootExtract(source, target, ZipDelete): os.system('echo "RESTART ZA 15 sekund..."') rc = os.system('rm -rf /lib/modules/%s/kernel/drivers/mtd/nand/nandsim.ko ' % getKernelVersion()) - + os.system('rm -r %s/ImageBoot/%s' % (media, target)) os.system('sleep 5; init 4; sleep 5; init 3 ') @@ -1120,7 +1120,7 @@ def NEOBootExtract(source, target, ZipDelete): os.system('mv -f root_cfe_auto.bin rootfs.bin') elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/vuplus/solose/root_cfe_auto.jffs2'): os.chdir('solose') - os.system('mv -f root_cfe_auto.jffs2 rootfs.bin') + os.system('mv -f root_cfe_auto.jffs2 rootfs.bin') if os.path.exists('' + getNeoLocation() + 'ImagesUpload/vuplus/ultimo'): os.chdir('ultimo') os.system('mv -f root_cfe_auto.jffs2 rootfs.bin') @@ -1143,7 +1143,7 @@ def NEOBootExtract(source, target, ZipDelete): if os.path.exists('' + getNeoLocation() + 'ImagesUpload/vuplus/ultimo4k'): os.chdir('ultimo4k') if os.path.exists('' + getNeoLocation() + 'ImagesUpload/vuplus/duo4k'): - os.chdir('duo4k') + os.chdir('duo4k') if os.path.exists('' + getNeoLocation() + 'ImagesUpload/vuplus/duo4kse'): os.chdir('duo4kse') if os.path.exists('' + getNeoLocation() + 'ImagesUpload/vuplus/zero4k'): @@ -1185,7 +1185,7 @@ def NEOBootExtract(source, target, ZipDelete): if os.path.exists('' + getNeoLocation() + 'ImagesUpload/sf4008'): os.chdir('sf4008') if os.path.exists('' + getNeoLocation() + 'ImagesUpload/octagon/sf8008'): - os.chdir('sf8008') + os.chdir('sf8008') if os.path.exists('' + getNeoLocation() + 'ImagesUpload/gigablue'): os.chdir('gigablue') if os.path.exists('' + getNeoLocation() + 'ImagesUpload/gigablue/quad'): @@ -1220,29 +1220,29 @@ def NEOBootExtract(source, target, ZipDelete): if os.path.exists('' + getNeoLocation() + 'ImagesUpload/formuler4turbo'): os.chdir('formuler4turbo') - #Instalacja image ubi_reader - os.system('echo "Instalacja - ubi_reader w toku..."') + #Instalacja image ubi_reader + os.system('echo "Instalacja - ubi_reader w toku..."') if os.path.exists('' + getNeoLocation() + 'ImagesUpload/vuplus/root_cfe_auto.*'): - os.system('mv -f root_cfe_auto.* rootfs.bin') + os.system('mv -f root_cfe_auto.* rootfs.bin') cmd = 'chmod 777 ' + extensions_path + 'NeoBoot/ubi_reader/ubi_extract_files.py' rc = os.system(cmd) cmd = 'python ' + extensions_path + 'NeoBoot/ubi_reader/ubi_extract_files.py rootfs.bin -o' + getNeoLocation() + 'ubi' rc = os.system(cmd) os.chdir('/home/root') - os.system('mv ' + getNeoLocation() + 'ubi/rootfs/* ' + getNeoLocation() + 'ImageBoot/%s/' % target) + os.system('mv ' + getNeoLocation() + 'ubi/rootfs/* ' + getNeoLocation() + 'ImageBoot/%s/' % target) cmd = 'chmod -R +x ' + getNeoLocation() + 'ImageBoot/' + target rc = os.system(cmd) else: os.system('echo "NeoBoot wykrył błąd !!! Prawdopodobnie brak ubi_reader lub nandsim."') - + #ARM elif getCPUtype() == 'ARMv7': os.chdir('' + getNeoLocation() + 'ImagesUpload') if os.path.exists('' + getNeoLocation() + 'ImagesUpload/h9/rootfs.ubi'): os.chdir('h9') - os.system('mv -f rootfs.ubi rootfs.bin') - os.system('echo "Instalacja - ubi_reader w toku..."') + os.system('mv -f rootfs.ubi rootfs.bin') + os.system('echo "Instalacja - ubi_reader w toku..."') print("[NeoBoot] Extracting UBIFS image and moving extracted image to our target") cmd = 'chmod 777 ' + extensions_path + 'NeoBoot/ubi_reader/ubi_extract_files.py' rc = os.system(cmd) @@ -1255,12 +1255,12 @@ def NEOBootExtract(source, target, ZipDelete): rc = os.system(cmd) cmd = 'rm -rf ' + getNeoLocation() + 'ubi' rc = os.system(cmd) - + elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/axas'): os.chdir('axas') if os.path.exists('' + getNeoLocation() + 'ImagesUpload/axas/axashistwin'): - os.chdir('axashistwin') - os.system('echo "Instalacja - ubi_reader w toku..."') + os.chdir('axashistwin') + os.system('echo "Instalacja - ubi_reader w toku..."') print("[NeoBoot] Extracting UBIFS image and moving extracted image to our target") cmd = 'chmod 777 ' + extensions_path + 'NeoBoot/ubi_reader/ubi_extract_files.py' rc = os.system(cmd) @@ -1276,8 +1276,8 @@ def NEOBootExtract(source, target, ZipDelete): elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/et10000/rootfs.bin'): os.chdir('et10000') - os.system('mv -f rootfs.bin rootfs.bin') - os.system('echo "Instalacja - ubi_reader w toku..."') + os.system('mv -f rootfs.bin rootfs.bin') + os.system('echo "Instalacja - ubi_reader w toku..."') print("[NeoBoot] Extracting UBIFS image and moving extracted image to our target") cmd = 'chmod 777 ' + extensions_path + 'NeoBoot/ubi_reader/ubi_extract_files.py' rc = os.system(cmd) @@ -1289,7 +1289,7 @@ def NEOBootExtract(source, target, ZipDelete): cmd = 'chmod -R +x ' + getNeoLocation() + 'ImageBoot/' + target rc = os.system(cmd) cmd = 'rm -rf ' + getNeoLocation() + 'ubi' - rc = os.system(cmd) + rc = os.system(cmd) #vuplus________________________ elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/vuplus/solo4k'): os.system('echo "Please wait. System installation VuPlus Solo4K."') @@ -1339,11 +1339,11 @@ def NEOBootExtract(source, target, ZipDelete): elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/dm900'): os.system('echo "Please wait. System installation Dreambox DM900."') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/dm900/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/dm900/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' - rc = os.system(cmd) + rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/dm920'): os.system('echo "Please wait. System installation Dreambox DM920."') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/dm920; tar -jxf ' + getNeoLocation() + 'ImagesUpload/dm920/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' - rc = os.system(cmd) + rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/dreamtwo'): os.system('echo "Please wait. System installation Dreambox dreamtwo."') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/dreamtwo; tar -jxf ' + getNeoLocation() + 'ImagesUpload/dreamtwo/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' @@ -1351,7 +1351,7 @@ def NEOBootExtract(source, target, ZipDelete): elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/hd51/rootfs.tar.bz2'): os.system('echo "Please wait. System installation AX 4K Box HD51 "') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/hd51/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/hd51/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' - rc = os.system(cmd) + rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/hd60'): os.system('echo "Please wait. System installation AX HD60 4K"') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/hd60/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/hd60/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' @@ -1367,11 +1367,11 @@ def NEOBootExtract(source, target, ZipDelete): elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/multibox'): os.system('echo "Please wait. System installation AX multi twin or combo"') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/multibox/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/multibox/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' - rc = os.system(cmd) + rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/multiboxse'): os.system('echo "Please wait. System installation maxytec"') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/multiboxse/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/multiboxse/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' - rc = os.system(cmd) + rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/axas/axasc4k'): os.system('echo "Please wait. System installation Axas his c4k"') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/axas/axasc4k/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/axas/axasc4k/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' @@ -1381,7 +1381,7 @@ def NEOBootExtract(source, target, ZipDelete): cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/e4hd/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/e4hd/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/gigablue/quad4k'): - os.system('echo "Please wait. System installation GigaBlue quad4k"') + os.system('echo "Please wait. System installation GigaBlue quad4k"') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/gigablue/quad4k/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/gigablue/quad4k/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/gigablue/ue4k'): @@ -1395,7 +1395,7 @@ def NEOBootExtract(source, target, ZipDelete): elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/update/force3uhd'): os.system('echo "Please wait. System installation force3uhd."') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/update/force3uhd/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/update/force3uhd/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' - rc = os.system(cmd) + rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/update/galaxy4k'): os.system('echo "Please wait. System installation Galaxy4k."') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/update/galaxy4k/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/update/galaxy4k/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' @@ -1403,15 +1403,15 @@ def NEOBootExtract(source, target, ZipDelete): elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/zgemma/h7/rootfs.tar.bz2'): os.system('echo "Please wait. System installation Zgemma H7."') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/zgemma/h7/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/zgemma/h7/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' - rc = os.system(cmd) + rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/zgemma/h9/rootfs.tar.bz2'): os.system('echo "Please wait. System installation Zgemma H9S ."') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/zgemma/h9/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/zgemma/h9/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' - rc = os.system(cmd) + rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/zgemma/h9se/rootfs.tar.bz2'): os.system('echo "Please wait. System installation Zgemma H9SE ."') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/zgemma/h9se/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/zgemma/h9se/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' - rc = os.system(cmd) + rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/zgemma/i55plus/rootfs.tar.bz2'): os.system('echo "Please wait. System installation Zgemma i55plus ."') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/zgemma/i55plus/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/zgemma/i55plus/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' @@ -1419,7 +1419,7 @@ def NEOBootExtract(source, target, ZipDelete): elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/h9combo/rootfs.tar.bz2'): os.system('echo "Please wait. System installation Zgemma h9combo ."') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/h9combo/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/h9combo/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' - rc = os.system(cmd) + rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/h9combose/rootfs.tar.bz2'): os.system('echo "Please wait. System installation Zgemma h9combose ."') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/h9combose/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/h9combose/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' @@ -1427,7 +1427,7 @@ def NEOBootExtract(source, target, ZipDelete): elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/h10/rootfs.tar.bz2'): os.system('echo "Please wait. System installation Zgemma h10 ."') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/h10/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/h10/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' - rc = os.system(cmd) + rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/miraclebox/mini4k'): os.system('echo "Please wait. System installation Miraclebox mini4k."') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/miraclebox/mini4k/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/miraclebox/mini4k/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' @@ -1459,27 +1459,27 @@ def NEOBootExtract(source, target, ZipDelete): elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/beyonwiz/v2'): os.system('echo "Please wait. System installation beyonwiz v2 4K w toku..."') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/beyonwiz/v2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/beyonwiz/v2/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' - rc = os.system(cmd) + rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/amiko/viper4k'): os.system('echo "Please wait. System installation Amiko viper4k 4K w toku..."') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/amiko/viper4k; tar -jxf ' + getNeoLocation() + 'ImagesUpload/amiko/viper4k/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' - rc = os.system(cmd) + rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/update/tmtwin4k'): os.system('echo "Please wait. System installation tmtwin4k."') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/update/tmtwin4k/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/update/tmtwin4k/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' - rc = os.system(cmd) + rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/gigablue/trio4k'): os.system('echo "Please wait. System installation trio4k 4K Combo..."') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/gigablue/trio4k; tar -jxf ' + getNeoLocation() + 'ImagesUpload/gigablue/trio4k/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' - rc = os.system(cmd) + rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/gigablue/ip4k'): os.system('echo "Please wait. System installation gbip4k 4K..."') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/gigablue/ip4k; tar -jxf ' + getNeoLocation() + 'ImagesUpload/gigablue/ip4k/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' - rc = os.system(cmd) + rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/protek4k'): os.system('echo "Please wait. System installation protek4k..."') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/protek4k; tar -jxf ' + getNeoLocation() + 'ImagesUpload/protek4k/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' - rc = os.system(cmd) + rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/bre2ze4k'): os.system('echo "Please wait. System installation WWIO BRE2ZE 4K."') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/bre2ze4k; tar -jxf ' + getNeoLocation() + 'ImagesUpload/bre2ze4k/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' @@ -1488,35 +1488,35 @@ def NEOBootExtract(source, target, ZipDelete): os.system('echo "Please wait. System installation spakowanego w plik tar.xz w toku..."') os.system('cp -af ' + getNeoLocation() + 'ImagesUpload/' + source + '.tar.xz ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.xz') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.xz; tar -jjxf ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.xz -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' - rc = os.system(cmd) + rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/' + source + '.tar.gz'): - os.system('echo "Please wait. System installation spakowanego w plik tar.gz w toku..."') + os.system('echo "Please wait. System installation spakowanego w plik tar.gz w toku..."') os.system('cp -af ' + getNeoLocation() + 'ImagesUpload/' + source + '.tar.gz ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.gz') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.gz; /bin/tar -xzvf ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.gz -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/' + source + '.tar.bz2'): - os.system('echo "Please wait. System installation spakowanego w plik tar.bz2 w toku..."') + os.system('echo "Please wait. System installation spakowanego w plik tar.bz2 w toku..."') os.system('cp -af ' + getNeoLocation() + 'ImagesUpload/' + source + '.tar.bz2 ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.bz2') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.bz2; tar -jxf ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.bz2 -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/' + source + '.mb'): - os.system('echo "Please wait. System installation spakowanego w plik .mb w toku..."') + os.system('echo "Please wait. System installation spakowanego w plik .mb w toku..."') os.system('cp -af ' + getNeoLocation() + 'ImagesUpload/' + source + '.mb ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.gz') cmd = 'chmod 777 ' + getNeoLocation() + 'ImagesUpload/*.tar.gz; tar -xzvf ' + getNeoLocation() + 'ImagesUpload/*.tar.gz -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' rc = os.system(cmd) - elif '.gz' in sourcefile4: + elif '.gz' in sourcefile4: os.system('cp -af ' + getNeoLocation() + 'ImagesUpload/*.tar.gz ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.gz') cmd = '/bin/tar -xzvf ' + getNeoLocation() + 'ImagesUpload/rootfs.tar.gz -C ' + getNeoLocation() + 'ImageBoot/' + target + ' > /dev/null 2>&1' - rc = os.system(cmd) - if '.gz' in sourcefile4: + rc = os.system(cmd) + if '.gz' in sourcefile4: cmd = 'rm -rf ' + getNeoLocation() + 'ImagesUpload/*.gz ' ' > /dev/null 2>&1' - rc = os.system(cmd) + rc = os.system(cmd) cmd = 'rm -f ' + getNeoLocation() + 'ImagesUpload/*.jpg ' ' > /dev/null 2>&1' - rc = os.system(cmd) + rc = os.system(cmd) elif os.path.exists('' + getNeoLocation() + 'ImagesUpload/rootfs.bin'): os.chdir('ImagesUpload') - os.system('mv -f rootfs.bin rootfs.bin') - os.system('echo "Instalacja - ubi_reader w toku..."') + os.system('mv -f rootfs.bin rootfs.bin') + os.system('echo "Instalacja - ubi_reader w toku..."') print("[NeoBoot] Extracting UBIFS image and moving extracted image to our target") cmd = 'chmod 777 ' + extensions_path + 'NeoBoot/ubi_reader/ubi_extract_files.py' rc = os.system(cmd) @@ -1533,5 +1533,5 @@ def NEOBootExtract(source, target, ZipDelete): else: os.system('echo "NeoBoot wykrył dłąd!!! Prawdopodobnie brak pliku instalacyjnego."') - return -#END + return +#END diff --git a/NeoBoot/files/Harddisk.py b/NeoBoot/files/Harddisk.py index 1a41e24..57ba9d5 100644 --- a/NeoBoot/files/Harddisk.py +++ b/NeoBoot/files/Harddisk.py @@ -1,21 +1,21 @@ # -*- coding: utf-8 -*- -from Plugins.Extensions.NeoBoot.__init__ import _ +from Plugins.Extensions.NeoBoot.__init__ import _ import os import time from Tools.Directories import fileExists, pathExists from Tools.CList import CList from Components.SystemInfo import SystemInfo from Components.Console import Console -from Plugins.Extensions.NeoBoot.files import Task +from Plugins.Extensions.NeoBoot.files import Task if fileExists('/usr/lib/python3.8'): - from Components import Task + from Components import Task else: - import Task + import Task try: from Task import LoggingTask -except: - from Components.Task import LoggingTask +except: + from Components.Task import LoggingTask from Screens.Screen import Screen from Components.ActionMap import ActionMap from Components.MenuList import MenuList @@ -125,7 +125,7 @@ class Harddisk(): break self.card = self.device[:2] == 'hd' and 'host0' not in self.dev_path - print("[Harddisk] new device"), self.device, '->', self.dev_path, '->', self.disk_path + print("[Harddisk] new device"), self.device, '->', self.dev_path, '->', self.disk_path if not removable and not self.card: self.startIdle() return @@ -274,7 +274,7 @@ class Harddisk(): return res >> 8 def createPartition(self): - cmd = 'printf "8,\n;0,0\n;0,0\n;0,0\ny\n" | sfdisk -f -uS ' + self.disk_path + cmd = 'printf "8,\n;0,0\n;0,0\n;0,0\ny\n" | sfdisk -f -uS ' + self.disk_path res = os.system(cmd) return res >> 8 @@ -297,7 +297,7 @@ class Harddisk(): parts = line.strip().split(' ') fspath = os.path.realpath(parts[0]) if fspath == dev: - print("[Harddisk] mounting:"), fspath + print("[Harddisk] mounting:"), fspath cmd = 'mount -t auto ' + fspath res = os.system(cmd) return res >> 8 @@ -542,7 +542,7 @@ class Partition(): def stat(self): if self.mountpoint: return os.statvfs(self.mountpoint) - raise (OSError, "Device %s is not mounted") % self.device + raise (OSError, "Device %s is not mounted") % self.device def free(self): try: @@ -624,7 +624,7 @@ class HarddiskManager(): ('/media/ram', _('Ram disk')), ('/media/usb', _('USB stick')), ('/media/usb1', _('USB1 stick')), - ('/media/usb2', _('USB2 stick')), + ('/media/usb2', _('USB2 stick')), ('/', _('Internal flash'))) known = set([os.path.normpath(a.mountpoint) for a in self.partitions if a.mountpoint]) for m, d in p: @@ -984,7 +984,7 @@ class HarddiskSetup(Screen): return try: from Task import job_manager - except: + except: from Components.Task import job_manager try: job = self.action() diff --git a/NeoBoot/files/devices.py b/NeoBoot/files/devices.py index 603d265..9d3206b 100644 --- a/NeoBoot/files/devices.py +++ b/NeoBoot/files/devices.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- - -from Plugins.Extensions.NeoBoot.__init__ import _ + +from Plugins.Extensions.NeoBoot.__init__ import _ from enigma import getDesktop from Plugins.Plugin import PluginDescriptor from Screens.ChoiceBox import ChoiceBox @@ -31,10 +31,10 @@ import os from Screens.VirtualKeyBoard import VirtualKeyBoard import gettext import os -from Plugins.Extensions.NeoBoot.files.stbbranding import getTunerModel +from Plugins.Extensions.NeoBoot.files.stbbranding import getTunerModel LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' - + class ManagerDevice(Screen): screenwidth = getDesktop(0).size().width() if screenwidth and screenwidth == 1920: @@ -43,7 +43,7 @@ class ManagerDevice(Screen): - + @@ -54,10 +54,10 @@ class ManagerDevice(Screen): """ else: skin = """ - + - + \n\t\t\t\t{"template": [\n\t\t\t\t MultiContentEntryText(pos = (90, 0), size = (600, 30), font=0, text = 0),\n\t\t\t\t MultiContentEntryText(pos = (110, 30), size = (600, 50), font=1, flags = RT_VALIGN_TOP, text = 1),\n\t\t\t\t MultiContentEntryPixmapAlphaBlend(pos = (0, 0), size = (80, 80)),\n\t\t\t\t],\n\t\t\t\t"fonts": [gFont("Regular", 24),gFont("Regular", 20)],\n\t\t\t\t"itemHeight": 85\n\t\t\t\t}\n\t\t\t @@ -90,7 +90,7 @@ class ManagerDevice(Screen): def Format_ext3(self): try: - if fileExists('/etc/vtiversion.info') or fileExists('/etc/bhversion'): + if fileExists('/etc/vtiversion.info') or fileExists('/etc/bhversion'): self.session.open(MessageBox, _("This option is available only from openpli or derivatives."), MessageBox.TYPE_INFO, timeout=10) else: from Harddisk import HarddiskSelection @@ -103,7 +103,7 @@ class ManagerDevice(Screen): self.session.openWithCallback(self.updateList, HarddiskSelection) def ExitBack(self): - self.close() + self.close() def setWindowTitle(self): self.setTitle(_('Mount Manager')) @@ -160,7 +160,7 @@ class ManagerDevice(Screen): device2 = re.sub('[0-9]', '', device) devicetype = path.realpath('/sys/block/' + device2 + '/device') d2 = device - name = _('HARD DISK: ') + name = _('HARD DISK: ') mypixmap = '' + LinkNeoBoot + '/images/dev_hdd.png' model = file('/sys/block/' + device2 + '/device/model').read() model = str(model).replace('\n', '') @@ -170,13 +170,13 @@ class ManagerDevice(Screen): mypixmap = '' + LinkNeoBoot + '/images/dev_usb.png' if devicetype.find('usb1') != -1: name = _('USB1: ') - mypixmap = '' + LinkNeoBoot + '/images/dev_usb.png' + mypixmap = '' + LinkNeoBoot + '/images/dev_usb.png' if devicetype.find('usb2') != -1: name = _('USB2: ') - mypixmap = '' + LinkNeoBoot + '/images/dev_usb.png' + mypixmap = '' + LinkNeoBoot + '/images/dev_usb.png' if devicetype.find('card') != -1: name = _('CARD: ') - mypixmap = '' + LinkNeoBoot + '/images/dev_sd.png' + mypixmap = '' + LinkNeoBoot + '/images/dev_sd.png' name = name + model self.Console = Console() @@ -304,8 +304,8 @@ class ManagerDevice(Screen): class DevicesConf(Screen, ConfigListScreen): screenwidth = getDesktop(0).size().width() if screenwidth and screenwidth == 1920: - skin = """ - + skin = """ + @@ -330,7 +330,7 @@ class DevicesConf(Screen, ConfigListScreen): 'red': self.close, 'back': self.close}) self.updateList() - + def updateList(self): self.list = [] list2 = [] @@ -382,11 +382,11 @@ class DevicesConf(Screen, ConfigListScreen): mypixmap = '' + LinkNeoBoot + '/images/dev_usb.png' if devicetype.find('usb2') != -1: name = _('USB2: ') - mypixmap = '' + LinkNeoBoot + '/images/dev_usb.png' + mypixmap = '' + LinkNeoBoot + '/images/dev_usb.png' if devicetype.find('card') != -1: name = _('CARD: ') mypixmap = '' + LinkNeoBoot + '/images/dev_sd.png' - + name = name + model f = open('/proc/mounts', 'r') for line in f.readlines(): @@ -423,7 +423,7 @@ class DevicesConf(Screen, ConfigListScreen): ('/media/cf', '/media/cf'), ('/media/card', '/media/card')])) if dtype == 'Linux': - dtype = 'ext2', 'ext3', 'ext4' + dtype = 'ext2', 'ext3', 'ext4' else: dtype = 'auto' item.value = d1.strip() @@ -432,7 +432,7 @@ class DevicesConf(Screen, ConfigListScreen): if des != '' and self.list.append(res): pass - def saveMypoints(self): + def saveMypoints(self): self.Console = Console() mycheck = False for x in self['config'].list: @@ -496,17 +496,17 @@ class DevicesConf(Screen, ConfigListScreen): # line2 = '"' + self.device_uuid2 + '"' + ':' + self.mountp + '\n' # out2.write(line2) # out2.close() - + #SetDiskLabel - dziekuje autorowi class SetDiskLabel(Screen): screenwidth = getDesktop(0).size().width() - if screenwidth and screenwidth == 1920: + if screenwidth and screenwidth == 1920: skin = """ - + @@ -521,7 +521,7 @@ class SetDiskLabel(Screen): - + diff --git a/NeoBoot/files/neoconsole.py b/NeoBoot/files/neoconsole.py index f63ce93..7c201dc 100644 --- a/NeoBoot/files/neoconsole.py +++ b/NeoBoot/files/neoconsole.py @@ -1,6 +1,6 @@ -# -*- coding: utf-8 -*- - -from Plugins.Extensions.NeoBoot.__init__ import _ +# -*- coding: utf-8 -*- + +from Plugins.Extensions.NeoBoot.__init__ import _ #from __future__ import print_function from enigma import eConsoleAppContainer from Screens.Screen import Screen @@ -25,13 +25,13 @@ class Console(Screen): self.closeOnSuccess = closeOnSuccess self.errorOcurred = False self['key_red'] = Label(_('Stop action')) - self['key_green'] = Label(_('Hide Console')) + self['key_green'] = Label(_('Hide Console')) self['text'] = ScrollLabel('') self['summary_description'] = StaticText('') self['actions'] = ActionMap(['WizardActions', 'DirectionActions', 'ColorActions'], {'ok': self.cancel, 'back': self.cancel, 'up': self.key_up, - 'down': self.key_down, + 'down': self.key_down, 'green': self.key_green, 'red': self.key_red}, -1) self.cmdlist = cmdlist @@ -77,7 +77,7 @@ class Console(Screen): self.toggleScreenHide(True) if self.cancel_msg: self.cancel_msg.close() - from Tools.Directories import fileExists + from Tools.Directories import fileExists if not fileExists('/etc/vtiversion.info'): lastpage = self['text'].isAtLastPage() self['text'].appendText('\n' + _('Execution finished!!')) diff --git a/NeoBoot/files/stbbranding.py b/NeoBoot/files/stbbranding.py index 15d1d9c..141e221 100644 --- a/NeoBoot/files/stbbranding.py +++ b/NeoBoot/files/stbbranding.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- -#from Plugins.Extensions.NeoBoot.__init__ import _ +#from Plugins.Extensions.NeoBoot.__init__ import _ import sys import os -import time +import time from Tools.Directories import fileExists, SCOPE_PLUGINS LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' @@ -37,7 +37,7 @@ def Log(param=''): elif param.lower() in ['flush']: LogFileObj.flush() return LogFileObj - + def clearMemory(): with open("/proc/sys/vm/drop_caches", "w") as f: @@ -49,10 +49,10 @@ def LogCrashGS(line): log_file = open('%sImageBoot/neoboot.log' % getNeoLocation(), 'a') log_file.write(line) log_file.close() - + def fileCheck(f, mode='r'): - return fileExists(f, mode) and f + return fileExists(f, mode) and f # if not IsImageName(): # from Components.PluginComponent import plugins @@ -64,8 +64,8 @@ def IsImageName(): for line in open("/etc/issue"): if "BlackHole" in line or "vuplus" in line: return True - return False - + return False + def mountp(): pathmp = [] @@ -85,22 +85,22 @@ def getSupportedTuners(): with open('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/stbinfo.cfg', 'r') as f: lines = f.read() f.close() - if lines.find("%s" % getBoxHostName()) != -1: + if lines.find("%s" % getBoxHostName()) != -1: supportedT = '%s' % getBoxHostName() return supportedT - + def getFreespace(dev): statdev = os.statvfs(dev) space = statdev.f_bavail * statdev.f_frsize / 1024 print("[NeoBoot] Free space on %s = %i kilobytes") % (dev, space) - return space + return space #check install def getCheckInstal1(): - neocheckinstal = 'UNKNOWN' + neocheckinstal = 'UNKNOWN' if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/install'): with open('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/install', 'r') as f: lines1 = f.read() @@ -108,10 +108,10 @@ def getCheckInstal1(): if not lines1.find('/dev/') != -1: neocheckinstal = '1' return neocheckinstal - + def getCheckInstal2(): - neocheckinstal = 'UNKNOWN' + neocheckinstal = 'UNKNOWN' if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location'): with open('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location', 'r') as f: lines2 = f.read() @@ -119,10 +119,10 @@ def getCheckInstal2(): if not lines2.find('/media/') != -1: neocheckinstal = '2' return neocheckinstal - + def getCheckInstal3(): - neocheckinstal = 'UNKNOWN' + neocheckinstal = 'UNKNOWN' if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh'): with open('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh', 'r') as f: lines3 = f.read() @@ -153,13 +153,13 @@ def getNeoLocation(): if os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location'): with open('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location', 'r') as f: locatino = f.readline().strip() - f.close() + f.close() return locatino #check ext def getFormat(): - neoformat = 'UNKNOWN' + neoformat = 'UNKNOWN' if os.path.exists('/proc/mounts'): with open('/proc/mounts', 'r') as f: lines = f.read() @@ -173,11 +173,11 @@ def getFormat(): elif lines.find('nfs') != -1: neoformat = 'nfs' - return neoformat + return neoformat def getNEO_filesystems(): - neo_filesystems = 'UNKNOWN' + neo_filesystems = 'UNKNOWN' if os.path.exists('/tmp/.neo_format'): with open('/tmp/.neo_format', 'r') as f: lines = f.read() @@ -206,7 +206,7 @@ def getCPUtype(): cpu = 'ARMv7' elif lines.find('mips') != -1: cpu = 'MIPS' - return cpu + return cpu #check install @@ -221,8 +221,8 @@ def getFSTAB(): install = 'UUID' elif not lines.find('UUID') != -1: install = 'NOUUID' - return install - + return install + def getFSTAB2(): install = 'UNKNOWN' @@ -234,7 +234,7 @@ def getFSTAB2(): install = 'OKinstall' elif not lines.find('UUID') != -1: install = 'NOUUID' - return install + return install def getINSTALLNeo(): @@ -246,24 +246,24 @@ def getINSTALLNeo(): if lines.find('/dev/sda1') != -1: neoinstall = '/dev/sda1' elif lines.find('/dev/sda2') != -1: - neoinstall = '/dev/sda2' + neoinstall = '/dev/sda2' elif lines.find('/dev/sdb1') != -1: neoinstall = '/dev/sdb1' elif lines.find('/dev/sdb2') != -1: neoinstall = '/dev/sdb2' elif lines.find('/dev/sdc1') != -1: - neoinstall = '/dev/sdc1' + neoinstall = '/dev/sdc1' elif lines.find('/dev/sdd1') != -1: - neoinstall = '/dev/sdd1' + neoinstall = '/dev/sdd1' elif lines.find('/dev/sde1') != -1: - neoinstall = '/dev/sde1' + neoinstall = '/dev/sde1' elif lines.find('/dev/sdf1') != -1: - neoinstall = '/dev/sdf1' + neoinstall = '/dev/sdf1' return neoinstall - -def getLocationMultiboot(): + +def getLocationMultiboot(): LocationMultiboot = 'UNKNOWN' if os.path.exists('/media/sda1/ImageBoot'): LocationMultiboot = '/dev/sda1' @@ -272,15 +272,15 @@ def getLocationMultiboot(): if os.path.exists('/media/sdb1/ImageBoot'): LocationMultiboot = '/dev/sdb1' if os.path.exists('/media/sdb2/ImageBoot'): - LocationMultiboot = '/dev/sdb2' + LocationMultiboot = '/dev/sdb2' if os.path.exists('/media/sdc1/ImageBoot'): - LocationMultiboot = '/dev/sdc1' + LocationMultiboot = '/dev/sdc1' if os.path.exists('/media/sdd1/ImageBoot'): - LocationMultiboot = '/dev/sdd1' + LocationMultiboot = '/dev/sdd1' if os.path.exists('/media/sde1/ImageBoot'): - LocationMultiboot = '/dev/sde1' + LocationMultiboot = '/dev/sde1' if os.path.exists('/media/sdf1/ImageBoot'): - LocationMultiboot = '/dev/sdf1' + LocationMultiboot = '/dev/sdf1' return LocationMultiboot @@ -292,10 +292,10 @@ def getLabelDisck(): lines = f.read() f.close() if lines.find('LABEL=') != -1: - label = 'LABEL=' - return label + label = 'LABEL=' + return label -#checking device neo +#checking device neo def getNeoMount(): @@ -321,7 +321,7 @@ def getNeoMount(): elif lines.find('/dev/sdf1 /media/hdd') != -1: neo = 'hdd_install_/dev/sdf1' - return neo + return neo def getNeoMount2(): @@ -343,7 +343,7 @@ def getNeoMount2(): elif lines.find('/dev/sde1 /media/usb') != -1: neo = 'usb_install_/dev/sde1' elif lines.find('/dev/sdf1 /media/usb') != -1: - neo = 'usb_install_/dev/sdf1' + neo = 'usb_install_/dev/sdf1' elif lines.find('/dev/sda1 /media/usb2') != -1: neo = 'usb_install_/dev/sda1' elif lines.find('/dev/sdb1 /media/usb2') != -1: @@ -380,13 +380,13 @@ def getNeoMount4(): if os.path.exists('/proc/mounts'): with open('/proc/mounts', 'r') as f: lines = f.read() - f.close() + f.close() if lines.find('/dev/sda1 /media/card') != -1: neo = 'card_install_/dev/sda1' elif lines.find('/dev/sdb1 /media/card') != -1: neo = 'card_install_/dev/sdb1' return neo - + def getNeoMount5(): neo = 'UNKNOWN' @@ -401,38 +401,38 @@ def getNeoMount5(): return neo -#zwraca typ chipa prcesora +#zwraca typ chipa prcesora def getCPUSoC(): chipset = 'UNKNOWN' if os.path.exists('/proc/stb/info/chipset'): with open('/proc/stb/info/chipset', 'r') as f: chipset = f.readline().strip() - f.close() + f.close() if chipset == '7405(with 3D)': chipset = '7405' return chipset - + def getCPUSoCModel(): devicetree = 'UNKNOWN' if os.path.exists('/proc/device-tree/model'): with open('/proc/device-tree/model', 'r') as f: devicetree = f.readline().strip() - f.close() - return devicetree + f.close() + return devicetree -#zwraca wybrane image w neoboot do uruchomienia +#zwraca wybrane image w neoboot do uruchomienia -def getImageNeoBoot(): +def getImageNeoBoot(): imagefile = 'UNKNOWN' if os.path.exists('%sImageBoot/.neonextboot' % getNeoLocation()): with open('%sImageBoot/.neonextboot' % getNeoLocation(), 'r') as f: imagefile = f.readline().strip() - f.close() + f.close() return imagefile -#zwraca model vuplus +#zwraca model vuplus def getBoxVuModel(): @@ -440,7 +440,7 @@ def getBoxVuModel(): if fileExists("/proc/stb/info/vumodel") and not fileExists("/proc/stb/info/boxtype"): with open('/proc/stb/info/vumodel', 'r') as f: vumodel = f.readline().strip() - f.close() + f.close() elif fileExists("/proc/stb/info/boxtype") and not fileExists("/proc/stb/info/vumodel"): with open('/proc/stb/info/boxtype', 'r') as f: vumodel = f.readline().strip() @@ -455,19 +455,19 @@ def getVuModel(): procmodel = f.readline().strip() f.close() model = procmodel.title().replace("olose", "olo SE").replace("olo2se", "olo2 SE").replace("2", "²") - return model + return model -#zwraca nazwe stb z pliku hostname +#zwraca nazwe stb z pliku hostname def getBoxHostName(): if os.path.exists('/etc/hostname'): with open('/etc/hostname', 'r') as f: myboxname = f.readline().strip() - f.close() - return myboxname + f.close() + return myboxname -#zwraca vuplus/vumodel +#zwraca vuplus/vumodel def getTunerModel(): #< neoboot.py @@ -480,7 +480,7 @@ def getTunerModel(): #< neoboot.py elif os.path.isfile('proc/stb/info/model') and not os.path.isfile("/proc/stb/info/mid"): BOX_NAME = open('/proc/stb/info/model').read().strip() return BOX_NAME - + #zwraca strukture folderu zip - vuplus/vumodel @@ -507,17 +507,17 @@ def runCMDS(cmdsList): if isinstance(cmdsList, (list, tuple)): myCMD = '\n'.join(cmdsList)# + '\n' ret = os.system(myCMD) - return rett + return rett -def getImageDistroN(): - image = 'Internal storage' +def getImageDistroN(): + image = 'Internal storage' - if fileExists('/.multinfo') and fileExists('%sImageBoot/.imagedistro' % getNeoLocation()): + if fileExists('/.multinfo') and fileExists('%sImageBoot/.imagedistro' % getNeoLocation()): with open('%sImageBoot/.imagedistro' % getNeoLocation(), 'r') as f: image = f.readline().strip() f.close() - + elif not fileExists('/.multinfo') and fileExists('/etc/vtiversion.info'): f = open("/etc/vtiversion.info", 'r') imagever = f.readline().strip().replace("Release ", " ") @@ -531,15 +531,15 @@ def getImageDistroN(): image = imagever # elif not fileExists('/.multinfo') and fileExists('/etc/vtiversion.info'): -# image = 'VTI Team Image ' - +# image = 'VTI Team Image ' + elif fileExists('/.multinfo') and fileExists('/etc/bhversion'): image = 'Flash ' + ' ' + getBoxHostName() elif fileExists('/.multinfo') and fileExists('/etc/vtiversion.info'): image = 'Flash ' + ' ' + getBoxHostName() - elif fileExists('/usr/lib/enigma2/python/boxbranding.so') and not fileExists('/.multinfo'): + elif fileExists('/usr/lib/enigma2/python/boxbranding.so') and not fileExists('/.multinfo'): from boxbranding import getImageDistro image = getImageDistro() @@ -547,11 +547,11 @@ def getImageDistroN(): obraz = open('/media/InternalFlash/etc/issue.net', 'r').readlines() imagetype = obraz[0][:-3] image = imagetype - + elif fileExists('/etc/issue.net') and not fileExists('/.multinfo'): obraz = open('/etc/issue.net', 'r').readlines() imagetype = obraz[0][:-3] - image = imagetype + image = imagetype else: image = 'Inernal Flash ' + ' ' + getBoxHostName() @@ -690,7 +690,7 @@ def getChipSetString(): return str(chipset.lower().replace('\n', '').replace('bcm', '')) except IOError: return 'unavailable' - + def getCPUString(): try: @@ -729,7 +729,7 @@ def getCpuCoresString(): return cores except IOError: return 'unavailable' - + def getEnigmaVersionString(): import enigma @@ -737,7 +737,7 @@ def getEnigmaVersionString(): if '-(no branch)' in enigma_version: enigma_version = enigma_version[:-12] return enigma_version - + def getKernelVersionString(): try: @@ -828,61 +828,61 @@ def getMachineProcModel(): elif BOX_NAME == 'uno4k': GETMACHINEPROCMODEL = 'bcm7252S' elif BOX_NAME == 'solo4k': - GETMACHINEPROCMODEL = 'bcm7376' + GETMACHINEPROCMODEL = 'bcm7376' elif BOX_NAME == 'zero4K': GETMACHINEPROCMODEL = 'bcm72604' elif BOX_NAME == 'uno4kse': - GETMACHINEPROCMODEL = '' + GETMACHINEPROCMODEL = '' procmodel = getMachineProcModel() return procmodel - + def getMountPointAll(): - os.system('touch ' + LinkNeoBoot + '/files/mountpoint.sh; echo "#!/bin/sh\n" >> ' + LinkNeoBoot + '/files/mountpoint.sh; chmod 0755 ' + LinkNeoBoot + '/files/mountpoint.sh') - if getNeoMount() == 'hdd_install_/dev/sda1': - os.system('echo "umount -l /media/hdd\nmkdir -p /media/hdd\nmkdir -p /media/sda1\n/bin/mount /dev/sda1 /media/hdd\n/bin/mount /dev/sda1 /media/sda1" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount() == 'hdd_install_/dev/sdb1': - os.system('echo "umount -l /media/hdd\nmkdir -p /media/hdd\nmkdir -p /media/sdb1\n/bin/mount /dev/sdb1 /media/hdd\n/bin/mount /dev/sdb1 /media/sdb1" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount() == 'hdd_install_/dev/sda2': - os.system('echo "umount -l /media/hdd\nmkdir -p /media/hdd\nmkdir -p /media/sda2\n/bin/mount /dev/sda2 /media/hdd\n/bin/mount /dev/sda2 /media/sda2" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount() == 'hdd_install_/dev/sdb2': - os.system('echo "umount -l /media/hdd\nmkdir -p /media/hdd\nmkdir -p /media/sdb2\n/bin/mount /dev/sdb2 /media/hdd\n/bin/mount /dev/sdb2 /media/sdb2" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + os.system('touch ' + LinkNeoBoot + '/files/mountpoint.sh; echo "#!/bin/sh\n" >> ' + LinkNeoBoot + '/files/mountpoint.sh; chmod 0755 ' + LinkNeoBoot + '/files/mountpoint.sh') + if getNeoMount() == 'hdd_install_/dev/sda1': + os.system('echo "umount -l /media/hdd\nmkdir -p /media/hdd\nmkdir -p /media/sda1\n/bin/mount /dev/sda1 /media/hdd\n/bin/mount /dev/sda1 /media/sda1" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount() == 'hdd_install_/dev/sdb1': + os.system('echo "umount -l /media/hdd\nmkdir -p /media/hdd\nmkdir -p /media/sdb1\n/bin/mount /dev/sdb1 /media/hdd\n/bin/mount /dev/sdb1 /media/sdb1" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount() == 'hdd_install_/dev/sda2': + os.system('echo "umount -l /media/hdd\nmkdir -p /media/hdd\nmkdir -p /media/sda2\n/bin/mount /dev/sda2 /media/hdd\n/bin/mount /dev/sda2 /media/sda2" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount() == 'hdd_install_/dev/sdb2': + os.system('echo "umount -l /media/hdd\nmkdir -p /media/hdd\nmkdir -p /media/sdb2\n/bin/mount /dev/sdb2 /media/hdd\n/bin/mount /dev/sdb2 /media/sdb2" >> ' + LinkNeoBoot + '/files/mountpoint.sh') #--------------------------------------------- - if getNeoMount2() == 'usb_install_/dev/sdb1': - os.system('echo "\numount -l /media/usb\nmkdir -p /media/usb\nmkdir -p /media/sdb1\n/bin/mount /dev/sdb1 /media/usb\n/bin/mount /dev/sdb1 /media/sdb1" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount2() == 'usb_install_/dev/sda1': - os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\nmkdir -p /media/sda1\n/bin/mount /dev/sda1 /media/sda1\n/bin/mount /dev/sda1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount2() == 'usb_install_/dev/sdb2': - os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\nmkdir -p /media/sdb2\n/bin/mount /dev/sdb2 /media/sdb2\n/bin/mount /dev/sdb2 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount2() == 'usb_install_/dev/sdc1': - os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\nmkdir -p /media/sdc1\n/bin/mount /dev/sdc1 /media/sdb2\n/bin/mount /dev/sdc1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount2() == 'usb_install_/dev/sdd1': - os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\nmkdir -p /media/sdd1\n/bin/mount /dev/sdd1 /media/sdd1\n/bin/mount /dev/sdd1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount2() == 'usb_install_/dev/sde1': - os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\nmkdir -p /media/sde1\n/bin/mount /dev/sde1 /media/sde1\n/bin/mount /dev/sde1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount2() == 'usb_install_/dev/sdf1': - os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\nmkdir -p /media/sdf1\n/bin/mount /dev/sdf1 /media/sdf1\n/bin/mount /dev/sdf1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - #--------------------------------------------- - elif getNeoMount3() == 'cf_install_/dev/sda1': - os.system('echo "umount -l /media/cf\nmkdir -p /media/cf\nmkdir -p /media/sdb1\n/bin/mount /dev/sda1 /media/cf\n/bin/mount /dev/sda1 /media/sda1" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount3() == 'cf_install_/dev/sdb1': - os.system('echo "umount -l /media/cf\nmkdir -p /media/cf\nmkdir -p /media/sdb1\n/bin/mount /dev/sdb1 /media/cf\n/bin/mount /dev/sdb1 /media/sdb1" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + if getNeoMount2() == 'usb_install_/dev/sdb1': + os.system('echo "\numount -l /media/usb\nmkdir -p /media/usb\nmkdir -p /media/sdb1\n/bin/mount /dev/sdb1 /media/usb\n/bin/mount /dev/sdb1 /media/sdb1" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount2() == 'usb_install_/dev/sda1': + os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\nmkdir -p /media/sda1\n/bin/mount /dev/sda1 /media/sda1\n/bin/mount /dev/sda1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount2() == 'usb_install_/dev/sdb2': + os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\nmkdir -p /media/sdb2\n/bin/mount /dev/sdb2 /media/sdb2\n/bin/mount /dev/sdb2 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount2() == 'usb_install_/dev/sdc1': + os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\nmkdir -p /media/sdc1\n/bin/mount /dev/sdc1 /media/sdb2\n/bin/mount /dev/sdc1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount2() == 'usb_install_/dev/sdd1': + os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\nmkdir -p /media/sdd1\n/bin/mount /dev/sdd1 /media/sdd1\n/bin/mount /dev/sdd1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount2() == 'usb_install_/dev/sde1': + os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\nmkdir -p /media/sde1\n/bin/mount /dev/sde1 /media/sde1\n/bin/mount /dev/sde1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount2() == 'usb_install_/dev/sdf1': + os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\nmkdir -p /media/sdf1\n/bin/mount /dev/sdf1 /media/sdf1\n/bin/mount /dev/sdf1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') #--------------------------------------------- - elif getNeoMount4() == 'card_install_/dev/sda1': - os.system('echo "umount -l /media/card\nmkdir -p /media/card\nmkdir -p /media/sda1\n/bin/mount /dev/sda1 /media/card\n/bin/mount /dev/sda1 /media/sda1" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount4() == 'card_install_/dev/sdb1': - os.system('echo "umount -l /media/card\nmkdir -p /media/card\nmkdir -p /media/sdb1\n/bin/mount /dev/sdb1 /media/card\n/bin/mount /dev/sdb1 /media/sdb1" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount3() == 'cf_install_/dev/sda1': + os.system('echo "umount -l /media/cf\nmkdir -p /media/cf\nmkdir -p /media/sdb1\n/bin/mount /dev/sda1 /media/cf\n/bin/mount /dev/sda1 /media/sda1" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount3() == 'cf_install_/dev/sdb1': + os.system('echo "umount -l /media/cf\nmkdir -p /media/cf\nmkdir -p /media/sdb1\n/bin/mount /dev/sdb1 /media/cf\n/bin/mount /dev/sdb1 /media/sdb1" >> ' + LinkNeoBoot + '/files/mountpoint.sh') #--------------------------------------------- - elif getNeoMount5() == 'mmc_install_/dev/sda1': - os.system('echo "umount -l /media/mmc\nmkdir -p /media/mmc\nmkdir -p /media/sda1\n/bin/mount /dev/sda1 /media/mmc\n/bin/mount /dev/sda1 /media/sda1" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount5() == 'mmc_install_/dev/sdb1': - os.system('echo "umount -l /media/mmc\nmkdir -p /media/mmc\nmkdir -p /media/sdb1\n/bin/mount /dev/sdb1 /media/mmc\n/bin/mount /dev/sdb1 /media/sdb1" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - os.system('echo "\n\nexit 0" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount4() == 'card_install_/dev/sda1': + os.system('echo "umount -l /media/card\nmkdir -p /media/card\nmkdir -p /media/sda1\n/bin/mount /dev/sda1 /media/card\n/bin/mount /dev/sda1 /media/sda1" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount4() == 'card_install_/dev/sdb1': + os.system('echo "umount -l /media/card\nmkdir -p /media/card\nmkdir -p /media/sdb1\n/bin/mount /dev/sdb1 /media/card\n/bin/mount /dev/sdb1 /media/sdb1" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + #--------------------------------------------- + elif getNeoMount5() == 'mmc_install_/dev/sda1': + os.system('echo "umount -l /media/mmc\nmkdir -p /media/mmc\nmkdir -p /media/sda1\n/bin/mount /dev/sda1 /media/mmc\n/bin/mount /dev/sda1 /media/sda1" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount5() == 'mmc_install_/dev/sdb1': + os.system('echo "umount -l /media/mmc\nmkdir -p /media/mmc\nmkdir -p /media/sdb1\n/bin/mount /dev/sdb1 /media/mmc\n/bin/mount /dev/sdb1 /media/sdb1" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + os.system('echo "\n\nexit 0" >> ' + LinkNeoBoot + '/files/mountpoint.sh') def getMountPointNeo(): - os.system('' + LinkNeoBoot + '/files/mountpoint.sh') - os.system('echo ' + getLocationMultiboot() + ' > ' + LinkNeoBoot + '/bin/install; chmod 0755 ' + LinkNeoBoot + '/bin/install') + os.system('' + LinkNeoBoot + '/files/mountpoint.sh') + os.system('echo ' + getLocationMultiboot() + ' > ' + LinkNeoBoot + '/bin/install; chmod 0755 ' + LinkNeoBoot + '/bin/install') if getLocationMultiboot() == '/dev/sda1': out = open('' + LinkNeoBoot + '/files/neo.sh', 'w') out.write('#!/bin/sh\n\n/bin/mount /dev/sda1 ' + getNeoLocation() + ' \n\nexit 0') @@ -902,7 +902,7 @@ def getMountPointNeo(): elif getLocationMultiboot() == '/dev/sdc1': out = open('' + LinkNeoBoot + '/files/neo.sh', 'w') out.write('#!/bin/sh\n\n/bin/mount /dev/sdc1 ' + getNeoLocation() + ' \n\nexit 0') - out.close() + out.close() elif getLocationMultiboot() == '/dev/sdd1': out = open('' + LinkNeoBoot + '/files/neo.sh', 'w') out.write('#!/bin/sh\n\n/bin/mount /dev/sdd1 ' + getNeoLocation() + ' \n\nexit 0') @@ -920,47 +920,46 @@ def getMountPointNeo(): def getMountPointNeo2(): #--------------------------------------------- - os.system('touch ' + LinkNeoBoot + '/files/mountpoint.sh; echo "#!/bin/sh" > ' + LinkNeoBoot + '/files/mountpoint.sh; chmod 0755 ' + LinkNeoBoot + '/files/mountpoint.sh') - if getNeoMount() == 'hdd_install_/dev/sda1': - os.system('echo "umount -l /media/hdd\nmkdir -p /media/hdd\n/bin/mount /dev/sda1 /media/hdd" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount() == 'hdd_install_/dev/sdb1': - os.system('echo "umount -l /media/hdd\nmkdir -p /media/hdd\n/bin/mount /dev/sdb1 /media/hdd" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount() == 'hdd_install_/dev/sda2': - os.system('echo "umount -l /media/hdd\nmkdir -p /media/hdd\n/bin/mount /dev/sda2 /media/hdd" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount() == 'hdd_install_/dev/sdb2': - os.system('echo "umount -l /media/hdd\nmkdir -p /media/hdd\n/bin/mount /dev/sda2 /media/hdd" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + os.system('touch ' + LinkNeoBoot + '/files/mountpoint.sh; echo "#!/bin/sh" > ' + LinkNeoBoot + '/files/mountpoint.sh; chmod 0755 ' + LinkNeoBoot + '/files/mountpoint.sh') + if getNeoMount() == 'hdd_install_/dev/sda1': + os.system('echo "umount -l /media/hdd\nmkdir -p /media/hdd\n/bin/mount /dev/sda1 /media/hdd" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount() == 'hdd_install_/dev/sdb1': + os.system('echo "umount -l /media/hdd\nmkdir -p /media/hdd\n/bin/mount /dev/sdb1 /media/hdd" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount() == 'hdd_install_/dev/sda2': + os.system('echo "umount -l /media/hdd\nmkdir -p /media/hdd\n/bin/mount /dev/sda2 /media/hdd" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount() == 'hdd_install_/dev/sdb2': + os.system('echo "umount -l /media/hdd\nmkdir -p /media/hdd\n/bin/mount /dev/sda2 /media/hdd" >> ' + LinkNeoBoot + '/files/mountpoint.sh') #--------------------------------------------- - if getNeoMount2() == 'usb_install_/dev/sdb1': - os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sdb1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount2() == 'usb_install_/dev/sda1': - os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sda1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount2() == 'usb_install_/dev/sdb2': - os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sdb2 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount2() == 'usb_install_/dev/sdc1': - os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sdc1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount2() == 'usb_install_/dev/sdd1': - os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sdd1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount2() == 'usb_install_/dev/sde1': - os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sde1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount2() == 'usb_install_/dev/sdf1': - os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sdf1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - #--------------------------------------------- - elif getNeoMount3() == 'cf_install_/dev/sda1': - os.system('echo "umount -l /media/cf\nmkdir -p /media/cf\n/bin/mount /dev/sda1 /media/cf" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount3() == 'cf_install_/dev/sdb1': - os.system('echo "umount -l /media/cf\nmkdir -p /media/cf\n/bin/mount /dev/sdb1 /media/cf" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + if getNeoMount2() == 'usb_install_/dev/sdb1': + os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sdb1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount2() == 'usb_install_/dev/sda1': + os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sda1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount2() == 'usb_install_/dev/sdb2': + os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sdb2 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount2() == 'usb_install_/dev/sdc1': + os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sdc1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount2() == 'usb_install_/dev/sdd1': + os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sdd1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount2() == 'usb_install_/dev/sde1': + os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sde1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount2() == 'usb_install_/dev/sdf1': + os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sdf1 /media/usb" >> ' + LinkNeoBoot + '/files/mountpoint.sh') #--------------------------------------------- - elif getNeoMount4() == 'card_install_/dev/sda1': - os.system('echo "umount -l /media/card\nmkdir -p /media/card\n/bin/mount /dev/sda1 /media/card" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount4() == 'card_install_/dev/sdb1': - os.system('echo "umount -l /media/card\nmkdir -p /media/card\n/bin/mount /dev/sdb1 /media/card" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount3() == 'cf_install_/dev/sda1': + os.system('echo "umount -l /media/cf\nmkdir -p /media/cf\n/bin/mount /dev/sda1 /media/cf" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount3() == 'cf_install_/dev/sdb1': + os.system('echo "umount -l /media/cf\nmkdir -p /media/cf\n/bin/mount /dev/sdb1 /media/cf" >> ' + LinkNeoBoot + '/files/mountpoint.sh') #--------------------------------------------- - elif getNeoMount5() == 'mmc_install_/dev/sda1': - os.system('echo "umount -l /media/mmc\nmkdir -p /media/mmc\n/bin/mount /dev/sda1 /media/mmc" >> ' + LinkNeoBoot + '/files/mountpoint.sh') - elif getNeoMount5() == 'mmc_install_/dev/sdb1': - os.system('echo "umount -l /media/mmc\nmkdir -p /media/mmc\n/bin/mount /dev/sdb1 /media/mmc" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount4() == 'card_install_/dev/sda1': + os.system('echo "umount -l /media/card\nmkdir -p /media/card\n/bin/mount /dev/sda1 /media/card" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount4() == 'card_install_/dev/sdb1': + os.system('echo "umount -l /media/card\nmkdir -p /media/card\n/bin/mount /dev/sdb1 /media/card" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + #--------------------------------------------- + elif getNeoMount5() == 'mmc_install_/dev/sda1': + os.system('echo "umount -l /media/mmc\nmkdir -p /media/mmc\n/bin/mount /dev/sda1 /media/mmc" >> ' + LinkNeoBoot + '/files/mountpoint.sh') + elif getNeoMount5() == 'mmc_install_/dev/sdb1': + os.system('echo "umount -l /media/mmc\nmkdir -p /media/mmc\n/bin/mount /dev/sdb1 /media/mmc" >> ' + LinkNeoBoot + '/files/mountpoint.sh') os.system('echo "\n\nexit 0" >> ' + LinkNeoBoot + '/files/mountpoint.sh') boxbrand = sys.modules[__name__] - diff --git a/NeoBoot/files/testinout b/NeoBoot/files/testinout index 90437b2..2b4d3b1 100644 --- a/NeoBoot/files/testinout +++ b/NeoBoot/files/testinout @@ -1,44 +1,44 @@ #!/usr/bin/python # -*- coding: utf-8 -*- - + import sys import os from os import system -import time +import time from Tools.Directories import fileExists, SCOPE_PLUGINS -def getAccesDate(): - timego = '' +def getAccesDate(): + timego = '' dana = getTestOutTime() # etc Nie! Szukana liczba jest wieksza! - strzal = getTestInTime() # tmp Nie! Szukana liczba jest mniejsza! + strzal = getTestInTime() # tmp Nie! Szukana liczba jest mniejsza! if strzal == dana: timego = 'access' elif strzal < dana: - timego = 'isaccess' + timego = 'isaccess' else: timego = 'timeoff' - os.system('echo "19700101" > /usr/lib/periodon/.kodn') + os.system('echo "19700101" > /usr/lib/periodon/.kodn') return timego def getTestCzas(): mytestnC = '' - if os.path.exists('/usr/lib/periodon/.accessdate'): + if os.path.exists('/usr/lib/periodon/.accessdate'): with open('/usr/lib/periodon/.accessdate', 'r') as f: mytestnC = f.readline().strip() - f.close() + f.close() return mytestnC def getTestToTest(): mytestnb = '' - if os.path.exists('/tmp/.nkod'): + if os.path.exists('/tmp/.nkod'): with open('/tmp/.nkod', 'r') as f: mytestnb = f.readline().strip() - f.close() + f.close() return mytestnb - + def getTestIn(): neopluspro = 'UNKNOWN' @@ -48,7 +48,7 @@ def getTestIn(): f.close() if lines.find('1234' + getTestToTest() + '') != -1: neopluspro = '1234%s' % getTestToTest() - return neopluspro + return neopluspro def getTestOut(): @@ -56,50 +56,48 @@ def getTestOut(): if os.path.exists('/tmp/.nkod'): with open('/tmp/.nkod', 'r') as f: lines2 = f.read() - f.close() + f.close() if lines2.find("%s" % getTestToTest()) != -1: - neoplus = '1234%s' % getTestToTest() - return neoplus - + neoplus = '1234%s' % getTestToTest() + return neoplus + def getAccessN(): neopro = 'UNKNOWN' if os.path.exists('/usr/lib/periodon/.kodn'): with open('/usr/lib/periodon/.kodn', 'r') as f: lines3 = f.read() - f.close() - if lines3.find('1234') != -1: + f.close() + if lines3.find('1234') != -1: neopro = '1234' elif not lines3.find('1234') != -1: neopro = '1235' - return neopro + return neopro -def getTestInTime(): +def getTestInTime(): mydatein = 'UNKNOWN' if os.path.exists('/tmp/.finishdate'): with open('/tmp/.finishdate', 'r') as f: mydatein = f.readline().strip() - f.close() - return mydatein - + f.close() + return mydatein + def getTestOutTime(): mydateout = 'UNKNOWN' if os.path.exists('/usr/lib/periodon/.accessdate'): with open('/usr/lib/periodon/.accessdate', 'r') as f: mydateout = f.readline().strip() - f.close() + f.close() return mydateout - + def getButtonPin(): - mypin = 'UNKNOWN' - if os.path.exists('/usr/lib/periodon'): + mypin = 'UNKNOWN' + if os.path.exists('/usr/lib/periodon'): out = open('/usr/lib/periodon/.kodn', 'w') out.write('1234%s' % getTestToTest()) - out.close() + out.close() mypin = 'pinok' - return mypin - - + return mypin diff --git a/NeoBoot/files/tools.py b/NeoBoot/files/tools.py index b54c016..c46d1c5 100644 --- a/NeoBoot/files/tools.py +++ b/NeoBoot/files/tools.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # system modules -from Plugins.Extensions.NeoBoot.__init__ import _ +from Plugins.Extensions.NeoBoot.__init__ import _ import codecs from enigma import getDesktop from Components.About import about @@ -14,7 +14,7 @@ from Components.Label import Label from Components.ProgressBar import ProgressBar from Components.ScrollLabel import ScrollLabel from Components.Pixmap import Pixmap, MultiPixmap -from Components.config import * +from Components.config import * from Screens.VirtualKeyBoard import VirtualKeyBoard from Screens.MessageBox import MessageBox from Screens.ChoiceBox import ChoiceBox @@ -33,24 +33,24 @@ from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_SKIN_IMAGE, 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 +from Plugins.Extensions.NeoBoot.files.stbbranding import fileCheck, getNeoLocation, getImageNeoBoot, getKernelVersionString, getBoxHostName, getCPUtype, getBoxVuModel, getTunerModel, getCPUSoC, getImageATv, getBoxModelVU import os import time import sys import struct -import shutil -if fileExists('/etc/vtiversion.info') or fileExists('/etc/bhversion') or fileExists('/usr/lib/python3.8') and fileExists('/.multinfo'): - from Screens.Console import Console +import shutil +if fileExists('/etc/vtiversion.info') or fileExists('/etc/bhversion') or fileExists('/usr/lib/python3.8') and fileExists('/.multinfo'): + from Screens.Console import Console else: try: - from Plugins.Extensions.NeoBoot.files.neoconsole import Console + from Plugins.Extensions.NeoBoot.files.neoconsole import Console except: from Screens.Console import Console -LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' -neoboot = getNeoLocation() +LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' +neoboot = getNeoLocation() media = getNeoLocation() -mediahome = media + '/ImageBoot/' - +mediahome = media + '/ImageBoot/' + def getDS(): s = getDesktop(0).size() @@ -69,14 +69,14 @@ def isHD(): def isUHD(): desktopSize = getDS() - return desktopSize[0] >= 1920 and desktopSize[0] < 3840 - + return desktopSize[0] >= 1920 and desktopSize[0] < 3840 + def getKernelVersion(): try: return open('/proc/version', 'r').read().split(' ', 4)[2].split('-', 2)[0] except: - return _('unknown') + return _('unknown') def getCPUtype(): @@ -95,17 +95,17 @@ def getCPUtype(): if os.path.exists('/etc/hostname'): with open('/etc/hostname', 'r') as f: myboxname = f.readline().strip() - f.close() - + f.close() + if os.path.exists('/proc/stb/info/vumodel'): with open('/proc/stb/info/vumodel', 'r') as f: vumodel = f.readline().strip() - f.close() + f.close() if os.path.exists('/proc/stb/info/boxtype'): with open('/proc/stb/info/boxtype', 'r') as f: boxtype = f.readline().strip() - f.close() + f.close() class BoundFunction: @@ -116,19 +116,19 @@ class BoundFunction: self.args = args def __call__(self): - self.fnc(*self.args) + self.fnc(*self.args) class MBTools(Screen): if isFHD(): - skin = """ + skin = """ - + \n \t\t{"template": [\n \t\t\tMultiContentEntryText(pos = (50, 1), size = (920, 56), flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER, text = 0),\n \t\t\tMultiContentEntryPixmapAlphaTest(pos = (6, 4), size = (66, 66), png = 1),\n \t\t\t],\n \t\t\t"fonts": [gFont("Regular", 35)],\n \t\t\t"itemHeight": 60\n \t\t}\n \t\t - + """ else: skin = '\n \n\t\t\n\t\t\t\n \t\t{"template": [\n \t\t\tMultiContentEntryText(pos = (50, 1), size = (520, 36), flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER, text = 0),\n \t\t\tMultiContentEntryPixmapAlphaTest(pos = (4, 2), size = (36, 36), png = 1),\n \t\t\t],\n \t\t\t"fonts": [gFont("Regular", 22)],\n \t\t\t"itemHeight": 36\n \t\t}\n \t\t\n\t\t\n ' @@ -142,7 +142,7 @@ class MBTools(Screen): self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'ok': self.KeyOk, 'back': self.close}) - def updateList(self): + def updateList(self): self.list = [] mypath = '' + LinkNeoBoot + '' if not fileExists(mypath + 'icons'): @@ -156,31 +156,31 @@ class MBTools(Screen): res = (_('Restore a copy of the image to NeoBoot'), png, 1) self.list.append(res) self['list']. list = self.list - + res = (_('Device manager'), png, 2) self.list.append(res) self['list']. list = self.list - + res = (_('Delete image ZIP from the ImagesUpload directory'), png, 3) self.list.append(res) self['list']. list = self.list - + res = (_('NeoBoot Backup'), png, 4) self.list.append(res) self['list']. list = self.list - res = (_('Restore neoboot backup'), png, 5) + res = (_('Restore neoboot backup'), png, 5) self.list.append(res) self['list']. list = self.list res = (_('Uninstall NeoBoot'), png, 6) self.list.append(res) self['list']. list = self.list - + res = (_('Update NeoBoot on all images.'), png, 7) self.list.append(res) self['list']. list = self.list - + res = (_('Update TV list on installed image.'), png, 8) self.list.append(res) self['list']. list = self.list @@ -188,7 +188,7 @@ class MBTools(Screen): res = (_('Update IPTVPlayer on installed image.'), png, 9) self.list.append(res) self['list']. list = self.list - + res = (_('Update FeedExtra on the installed image.'), png, 10) self.list.append(res) self['list']. list = self.list @@ -200,7 +200,7 @@ class MBTools(Screen): res = (_('Check the correctness of neoboot installation'), png, 12) self.list.append(res) self['list']. list = self.list - + res = (_('Skin change'), png, 13) self.list.append(res) self['list']. list = self.list @@ -220,10 +220,10 @@ class MBTools(Screen): res = (_('Updates feed cam OpenATV softcam'), png, 17) self.list.append(res) self['list']. list = self.list - + res = (_('Create swap- file.'), png, 18) self.list.append(res) - self['list']. list = self.list + self['list']. list = self.list res = (_('Supported sat tuners'), png, 19) self.list.append(res) @@ -232,10 +232,10 @@ class MBTools(Screen): res = (_('NeoBoot Information'), png, 20) self.list.append(res) self['list']. list = self.list - + res = (_('NeoBoot donate'), png, 21) self.list.append(res) - self['list']. list = self.list + self['list']. list = self.list def KeyOk(self): self.sel = self['list'].getCurrent() @@ -251,7 +251,7 @@ class MBTools(Screen): pass if self.sel == 4 and self.session.open(BackupMultiboot): pass - if self.sel == 5 and self.session.open(ReinstllNeoBoot): + if self.sel == 5 and self.session.open(ReinstllNeoBoot): pass if self.sel == 6 and self.session.open(UnistallMultiboot): pass @@ -263,22 +263,22 @@ class MBTools(Screen): pass if self.sel == 10 and self.session.open(FeedExtra): pass - if self.sel == 11 and self.session.open(SetPasswd): + if self.sel == 11 and self.session.open(SetPasswd): + pass + if self.sel == 12 and self.session.open(CheckInstall): pass - if self.sel == 12 and self.session.open(CheckInstall): - pass if self.sel == 13 and self.session.open(SkinChange): pass if self.sel == 14 and self.session.open(BlocUnblockImageSkin): - pass - if self.sel == 15 and self.session.open(InternalFlash): pass - if self.sel == 16 and self.session.open(DeletingLanguages): + if self.sel == 15 and self.session.open(InternalFlash): pass - if self.sel == 17 and self.session.open(ATVcamfeed): + if self.sel == 16 and self.session.open(DeletingLanguages): + pass + if self.sel == 17 and self.session.open(ATVcamfeed): + pass + if self.sel == 18 and self.session.open(CreateSwap): pass - if self.sel == 18 and self.session.open(CreateSwap): - pass if self.sel == 19 and self.session.open(TunerInfo): pass if self.sel == 20 and self.session.open(MultiBootMyHelp): @@ -288,30 +288,30 @@ class MBTools(Screen): if self.sel == 22 and self.session.open(CheckInternet): pass - + class MBBackup(Screen): if isFHD(): - skin = """ - + skin = """ + - - - - - - + + + + + + """ else: - skin = """ - - - - \ + skin = """ + + + + \ - \n - - """ + \n + + """ def __init__(self, session): Screen.__init__(self, session) @@ -326,8 +326,8 @@ class MBBackup(Screen): if pathExists('/media/usb/ImageBoot'): neoboot = 'usb' elif pathExists('/media/hdd/ImageBoot'): - neoboot = 'hdd' - self.backupdir = '/media/' + neoboot + '/CopyImageNEO' + neoboot = 'hdd' + self.backupdir = '/media/' + neoboot + '/CopyImageNEO' self.availablespace = '0' self.onShow.append(self.updateInfo) @@ -335,8 +335,8 @@ class MBBackup(Screen): if pathExists('/media/usb/ImageBoot'): neoboot = 'usb' elif pathExists('/media/hdd/ImageBoot'): - neoboot = 'hdd' - device = '/media/' + neoboot + '' + neoboot = 'hdd' + device = '/media/' + neoboot + '' usfree = '0' devicelist = ['cf', 'hdd', @@ -353,7 +353,7 @@ class MBBackup(Screen): for line in f.readlines(): if line.find('/hdd') != -1: self.backupdir = '/media/' + neoboot + '/CopyImageNEO' - device = '/media/' + neoboot + '' + device = '/media/' + neoboot + '' f.close() if pathExists(self.backupdir) == 0 and createDir(self.backupdir): @@ -388,7 +388,7 @@ class MBBackup(Screen): def backupImage(self): if not fileExists('/.multinfo'): - self.backupImage2() + self.backupImage2() else: self.myClose(_('Sorry, Neoboot can be installed or upgraded only when booted from Flash')) @@ -402,7 +402,7 @@ class MBBackup(Screen): if int(self.availablespace) < 150: myerror = _('There is no space to make a copy of the image. You need 150 Mb of free space for copying the image.') if myerror == '': - message = (_('Make copies of the image: %s now ?') % image) + message = (_('Make copies of the image: %s now ?') % image) ybox = self.session.openWithCallback(self.dobackupImage, MessageBox, message, MessageBox.TYPE_YESNO) ybox.setTitle(_('Backup confirmation')) else: @@ -413,7 +413,7 @@ class MBBackup(Screen): if pathExists('/media/usb/ImageBoot'): neoboot = 'usb' elif pathExists('/media/hdd/ImageBoot'): - neoboot = 'hdd' + neoboot = 'hdd' cmd = "echo -e '\n\n%s '" % _('Please wait, NeoBoot is working, the backup may take a few moments, the process is in progress ...') cmd1 = '/bin/tar -cf ' + self.backupdir + '/' + self.backimage + '.tar /media/' + neoboot + '/ImageBoot/' + self.backimage + ' > /dev/null 2>&1' cmd2 = 'mv -f ' + self.backupdir + '/' + self.backimage + '.tar ' + self.backupdir + '/' + self.backimage + '.mb' @@ -427,33 +427,33 @@ class MBBackup(Screen): self.close() def myClose(self, message): - self.session.open(MessageBox, message, MessageBox.TYPE_INFO) + self.session.open(MessageBox, message, MessageBox.TYPE_INFO) self.close() class MBRestore(Screen): - __module__ = __name__ - skin = """ - - - - - - - - + __module__ = __name__ + skin = """ + + + + + + + + """ - def __init__(self, session): + def __init__(self, session): Screen.__init__(self, session) self['lab1'] = Label(_('Choose copy you want to restore or delete.')) self['key_red'] = Label(_('Delete file')) self['key_green'] = Label(_('Restore')) - self['list'] = List([]) + self['list'] = List([]) self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'back': self.close, 'ok': self.restoreImage, 'red': self.deleteback, - 'green': self.restoreImage}) + 'green': self.restoreImage}) self.backupdir = '' + getNeoLocation() + 'CopyImageNEO' self.onShow.append(self.updateInfo) @@ -483,7 +483,7 @@ class MBRestore(Screen): self.backupdir = '' + getNeoLocation() + 'CopyImageNEO' elif line.find('/usb') != -1: self.backupdir = '' + getNeoLocation() + 'CopyImageNEO' - f.close() + f.close() if pathExists(self.backupdir) == 0 and createDir(self.backupdir): pass if fileExists('/tmp/ninfo.tmp'): @@ -501,7 +501,7 @@ class MBRestore(Screen): f.close() os_remove('/tmp/ninfo.tmp') - + imageslist = [] for fn in listdir(self.backupdir): imageslist.append(fn) @@ -510,7 +510,7 @@ class MBRestore(Screen): def deleteback(self): if not fileExists('/.multinfo'): - self.deleteback2() + self.deleteback2() else: self.myClose(_('Sorry, Neoboot can be installed or upgraded only when booted from Flash')) @@ -518,7 +518,7 @@ class MBRestore(Screen): image = self['list'].getCurrent() if image: self.delimage = image.strip() - message = (_('Software selected: %s remove ?') % image) + message = (_('Software selected: %s remove ?') % image) ybox = self.session.openWithCallback(self.dodeleteback, MessageBox, message, MessageBox.TYPE_YESNO) ybox.setTitle(_('Confirmation of Deletion...')) @@ -533,7 +533,7 @@ class MBRestore(Screen): def restoreImage(self): if not fileExists('/.multinfo'): - self.restoreImage2() + self.restoreImage2() else: self.myClose(_('Sorry, Neoboot can be installed or upgraded only when booted from Flash')) @@ -551,7 +551,7 @@ class MBRestore(Screen): if curimage == imagename: myerror = _('Sorry you cannot overwrite the image currently booted from. Please, boot from Flash to restore this backup.') if myerror == '': - message = (_('The required space on the device is 300 MB.\nDo you want to take this image: %s \nnow ?') % image) + message = (_('The required space on the device is 300 MB.\nDo you want to take this image: %s \nnow ?') % image) ybox = self.session.openWithCallback(self.dorestoreImage, MessageBox, message, MessageBox.TYPE_YESNO) ybox.setTitle(_('Restore Confirmation')) else: @@ -574,12 +574,12 @@ class MBRestore(Screen): cmd5]) self.close() else: - self.close() + self.close() def myClose(self, message): - self.session.open(MessageBox, message, MessageBox.TYPE_INFO) + self.session.open(MessageBox, message, MessageBox.TYPE_INFO) self.close() - + class MenagerDevices(Screen): __module__ = __name__ @@ -590,9 +590,9 @@ class MenagerDevices(Screen): """ def __init__(self, session): - Screen.__init__(self, session) - self['lab1'] = Label(_('Start the device manager')) - self['key_red'] = Label(_('Run')) + Screen.__init__(self, session) + self['lab1'] = Label(_('Start the device manager')) + self['key_red'] = Label(_('Run')) self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'back': self.close, 'red': self.MD}) @@ -600,7 +600,7 @@ class MenagerDevices(Screen): try: from Plugins.Extensions.NeoBoot.files.devices import ManagerDevice self.session.open(ManagerDevice) - + except: False @@ -628,7 +628,7 @@ class MBDeleUpload(Screen): def pedeleup(self, answer): if answer is True: cmd = "echo -e '\n\n%s '" % _('Wait, deleting .....') - cmd1 = 'rm -r ' + getNeoLocation() + 'ImagesUpload/*.zip' + cmd1 = 'rm -r ' + getNeoLocation() + 'ImagesUpload/*.zip' self.session.open(Console, _('Deleting downloaded image zip files ....'), [cmd, cmd1]) self.close() else: @@ -637,7 +637,7 @@ class MBDeleUpload(Screen): class BackupMultiboot(Screen): __module__ = __name__ - skin = """ + skin = """ \n\t\t{"template": [\n\t\t\tMultiContentEntryText(pos = (50, 1), size = (620, 46), flags = RT_HALIGN_LEFT|RT_VALIGN_CENTER, text = 0),\n\t\t\tMultiContentEntryPixmapAlphaTest(pos = (6, 4), size = (46, 46), png = 1),\n\t\t\t],\n\t\t\t"fonts": [gFont("dugme", 30)],\n\t\t\t"itemHeight": 46\n\t\t}\n\t\t @@ -681,12 +681,12 @@ class UnistallMultiboot(Screen): def usun(self): if not fileExists('/.multinfo'): - self.usun2() + self.usun2() else: self.myClose(_('Sorry, Neoboot can be installed or upgraded only when booted from Flash')) def myClose(self, message): - self.session.open(MessageBox, message, MessageBox.TYPE_INFO) + self.session.open(MessageBox, message, MessageBox.TYPE_INFO) self.close() def usun2(self): @@ -709,7 +709,7 @@ class UnistallMultiboot(Screen): cmd7a = "echo -e '\n\nUninstalling neoboot...\n'" cmd8 = "echo -e '\n\nRestore mount.'" cmd9 = "echo -e '\n\nNeoBoot uninstalled, you can do reinstallation.'" - cmd10 = "echo -e '\n\nNEOBoot Exit or Back - RESTART GUI NOW !!!'" + cmd10 = "echo -e '\n\nNEOBoot Exit or Back - RESTART GUI NOW !!!'" self.session.open(Console, _('NeoBoot is reinstall...'), [cmd0, cmd, cmd1, @@ -723,17 +723,17 @@ class UnistallMultiboot(Screen): cmd7a, cmd8, cmd9, - cmd10]) + cmd10]) else: self.close() def myClose(self, message): - self.session.open(MessageBox, message, MessageBox.TYPE_INFO) + self.session.open(MessageBox, message, MessageBox.TYPE_INFO) self.close() def checkNeo(self): - if not fileCheck('' + LinkNeoBoot + '/.location') and not fileCheck(' ' + getNeoLocation() + 'ImageBoot/.neonextboot'): - self.restareE2() + if not fileCheck('' + LinkNeoBoot + '/.location') and not fileCheck(' ' + getNeoLocation() + 'ImageBoot/.neonextboot'): + self.restareE2() else: self.close() @@ -755,29 +755,29 @@ class ReinstllNeoBoot(Screen): self['key_red'] = Label(_('Backup')) self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'back': self.close, 'red': self.reinstallMB}) - + def reinstallMB(self): - self.session.open(ReinstllNeoBoot2) - + self.session.open(ReinstllNeoBoot2) + class ReinstllNeoBoot2(Screen): __module__ = __name__ - skin = """ - - - - - - - - + skin = """ + + + + + + + + """ def __init__(self, session): Screen.__init__(self, session) self['lab1'] = Label(_('Choose copy you want to restore or delete.')) self['key_red'] = Label(_('Delete file')) - self['key_green'] = Label(_('Restore')) + self['key_green'] = Label(_('Restore')) self['list'] = List([]) self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'back': self.close, 'ok': self.restoreImage, @@ -790,7 +790,7 @@ class ReinstllNeoBoot2(Screen): self.backupdir = '' + getNeoLocation() + 'CopyNEOBoot' if pathExists(self.backupdir) == 0 and createDir(self.backupdir): pass - + imageslist = [] for fn in listdir(self.backupdir): imageslist.append(fn) @@ -801,7 +801,7 @@ class ReinstllNeoBoot2(Screen): image = self['list'].getCurrent() if image: self.delimage = image.strip() - message = (_('Software selected: %s remove ?') % image) + message = (_('Software selected: %s remove ?') % image) ybox = self.session.openWithCallback(self.dodeleteback, MessageBox, message, MessageBox.TYPE_YESNO) ybox.setTitle(_('Confirmation of Deletion...')) @@ -818,14 +818,14 @@ class ReinstllNeoBoot2(Screen): image = self['list'].getCurrent() myerror = '' if myerror == '': - message = (_('The required space on the device is 300 MB.\nDo you want to take this image: %s \nnow ?') % image) + message = (_('The required space on the device is 300 MB.\nDo you want to take this image: %s \nnow ?') % image) ybox = self.session.openWithCallback(self.dorestoreImage, MessageBox, message, MessageBox.TYPE_YESNO) ybox.setTitle(_('Restore Confirmation')) else: self.session.open(MessageBox, myerror, MessageBox.TYPE_INFO) def dorestoreImage(self, answer): - image = self['list'].getCurrent() + image = self['list'].getCurrent() if answer is True: self.backimage = image.strip() imagename = self.backimage[0:-3] @@ -857,12 +857,12 @@ class UpdateNeoBoot(Screen): def mbupload(self): if not fileExists('/.multinfo'): - self.session.open(MyUpgrade2) + self.session.open(MyUpgrade2) else: self.myClose(_('Sorry, Neoboot can be installed or upgraded only when booted from Flash')) def myClose(self, message): - self.session.open(MessageBox, message, MessageBox.TYPE_INFO) + self.session.open(MessageBox, message, MessageBox.TYPE_INFO) self.close() @@ -886,7 +886,7 @@ class MyUpgrade2(Screen): def updateInfo(self): periodo = '/usr/lib/periodon' - testinout = '/usr/lib/enigma2/python/Tools/Testinout.p*' + testinout = '/usr/lib/enigma2/python/Tools/Testinout.p*' self.activityTimer.stop() f2 = open('%sImageBoot/.neonextboot' % getNeoLocation(), 'r') mypath2 = f2.readline().strip() @@ -894,13 +894,13 @@ class MyUpgrade2(Screen): if mypath2 != 'Flash': self.myClose(_('Sorry, NeoBoot can installed or upgraded only when booted from Flash STB')) self.close() - else: + else: for fn in listdir('%sImageBoot' % getNeoLocation()): dirfile = '%sImageBoot/' % getNeoLocation() + fn if isdir(dirfile): target = dirfile + '' + LinkNeoBoot + '' target1 = dirfile + '/usr/lib/' - target2 = dirfile + '/usr/lib/enigma2/python/Tools/' + target2 = dirfile + '/usr/lib/enigma2/python/Tools/' cmd = 'rm -r ' + target + ' > /dev/null 2>&1' system(cmd) cmd = 'cp -r ' + LinkNeoBoot + ' ' + target @@ -908,7 +908,7 @@ class MyUpgrade2(Screen): cmd1 = 'cp -rf ' + periodo + ' ' + target1 system(cmd1) cmd2 = 'cp -rf ' + testinout + ' ' + target2 - system(cmd2) + system(cmd2) out = open('%sImageBoot/.version' % getNeoLocation(), 'w') out.write(PLUGINVERSION) @@ -916,9 +916,9 @@ class MyUpgrade2(Screen): self.myClose(_('NeoBoot successfully updated. You can restart the plugin now.\nHave fun !!')) def myClose(self, message): - self.session.open(MessageBox, message, MessageBox.TYPE_INFO) - self.close() - + self.session.open(MessageBox, message, MessageBox.TYPE_INFO) + self.close() + class ListTv(Screen): __module__ = __name__ @@ -937,7 +937,7 @@ class ListTv(Screen): def listupload(self): if not fileExists('/.multinfo'): - self.listupload2() + self.listupload2() else: self.myClose(_('Sorry, Neoboot can be installed or upgraded only when booted from Flash')) @@ -945,7 +945,7 @@ class ListTv(Screen): self.session.open(ListTv2) def myClose(self, message): - self.session.open(MessageBox, message, MessageBox.TYPE_INFO) + self.session.open(MessageBox, message, MessageBox.TYPE_INFO) self.close() @@ -955,7 +955,7 @@ class ListTv2(Screen): if isFHD(): skin = """ - """ + """ else: skin = '\n\t\t\n\t' @@ -1022,7 +1022,7 @@ class IPTVPlayer(Screen): def IPTVPlayerUpload(self): if not fileExists('/.multinfo'): - self.IPTVPlayerUpload2() + self.IPTVPlayerUpload2() else: self.myClose(_('Sorry, Neoboot can be installed or upgraded only when booted from Flash')) @@ -1030,7 +1030,7 @@ class IPTVPlayer(Screen): self.session.open(IPTVPlayer2) def myClose(self, message): - self.session.open(MessageBox, message, MessageBox.TYPE_INFO) + self.session.open(MessageBox, message, MessageBox.TYPE_INFO) self.close() @@ -1099,7 +1099,7 @@ class FeedExtra(Screen): def FeedExtraUpload(self): if not fileExists('/.multinfo'): - self.FeedExtraUpload2() + self.FeedExtraUpload2() else: self.myClose(_('Sorry, Neoboot can be installed or upgraded only when booted from Flash')) @@ -1107,7 +1107,7 @@ class FeedExtra(Screen): self.session.open(FeedExtra2) def myClose(self, message): - self.session.open(MessageBox, message, MessageBox.TYPE_INFO) + self.session.open(MessageBox, message, MessageBox.TYPE_INFO) self.close() @@ -1200,58 +1200,58 @@ class CheckInstall(Screen): self['key_red'] = Label(_('Start')) self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'back': self.close, 'red': self.neocheck}) - + def neocheck(self): if not fileExists('/.multinfo'): - self.neocheck2() + self.neocheck2() else: self.myClose(_('Sorry, Neoboot can be installed or upgraded only when booted from Flash')) def neocheck2(self): os.system(_('rm -f ' + LinkNeoBoot + '/files/modulecheck; echo %s - %s > ' + LinkNeoBoot + '/files/modulecheck') % (getBoxModelVU(), getCPUSoC())) - os.system('echo "\n====================================================>\nCheck result:" >> ' + LinkNeoBoot + '/files/modulecheck') + os.system('echo "\n====================================================>\nCheck result:" >> ' + LinkNeoBoot + '/files/modulecheck') os.system('echo "* neoboot location:" >> ' + LinkNeoBoot + '/files/modulecheck; cat "/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location" >> ' + LinkNeoBoot + '/files/modulecheck') os.system('echo "\n* neoboot location install:" >> ' + LinkNeoBoot + '/files/modulecheck; cat "/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/install" >> ' + LinkNeoBoot + '/files/modulecheck') - os.system('echo "\n* neoboot location mount:" >> ' + LinkNeoBoot + '/files/modulecheck; cat "/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh" >> ' + LinkNeoBoot + '/files/modulecheck') + os.system('echo "\n* neoboot location mount:" >> ' + LinkNeoBoot + '/files/modulecheck; cat "/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/neo.sh" >> ' + LinkNeoBoot + '/files/modulecheck') if getCPUtype() == 'ARMv7' and getCPUtype() != 'MIPS': if os.system('opkg update; opkg list-installed | grep python-subprocess') != 0: os.system('echo "\n* python-subprocess not installed" >> ' + LinkNeoBoot + '/files/modulecheck') if os.system('opkg list-installed | grep python-argparse') != 0: - os.system('echo "* python-argparse not installed" >> ' + LinkNeoBoot + '/files/modulecheck') + os.system('echo "* python-argparse not installed" >> ' + LinkNeoBoot + '/files/modulecheck') if os.system('opkg list-installed | grep curl') != 0: - os.system('echo "* curl not installed" >> ' + LinkNeoBoot + '/files/modulecheck') - else: + os.system('echo "* curl not installed" >> ' + LinkNeoBoot + '/files/modulecheck') + else: os.system('echo "\n* opkg packed everything is OK !" >> ' + LinkNeoBoot + '/files/modulecheck') elif getCPUtype() != 'ARMv7' and getCPUtype() == 'MIPS': if os.system('opkg list-installed | grep kernel-module-nandsim') != 0: - os.system('echo "\n* kernel-module-nandsim not installed" >> ' + LinkNeoBoot + '/files/modulecheck') + os.system('echo "\n* kernel-module-nandsim not installed" >> ' + LinkNeoBoot + '/files/modulecheck') if os.system('opkg list-installed | grep mtd-utils-jffs2') != 0: - os.system('echo "* mtd-utils-jffs2 not installed" >> ' + LinkNeoBoot + '/files/modulecheck') + os.system('echo "* mtd-utils-jffs2 not installed" >> ' + LinkNeoBoot + '/files/modulecheck') if os.system('opkg list-installed | grep lzo') != 0: - os.system('echo "* lzo not installed" >> ' + LinkNeoBoot + '/files/modulecheck') - if os.system('opkg list-installed | grep python-setuptools') != 0: - os.system('echo "* python-setuptools not installed" >> ' + LinkNeoBoot + '/files/modulecheck') - if os.system('opkg list-installed | grep util-linux-sfdisk') != 0: - os.system('echo "* util-linux-sfdisk not installed" >> ' + LinkNeoBoot + '/files/modulecheck') - if os.system('opkg list-installed | grep packagegroup-base-nfs') != 0: - os.system('echo "* packagegroup-base-nfs not installed" >> ' + LinkNeoBoot + '/files/modulecheck') + os.system('echo "* lzo not installed" >> ' + LinkNeoBoot + '/files/modulecheck') + if os.system('opkg list-installed | grep python-setuptools') != 0: + os.system('echo "* python-setuptools not installed" >> ' + LinkNeoBoot + '/files/modulecheck') + if os.system('opkg list-installed | grep util-linux-sfdisk') != 0: + os.system('echo "* util-linux-sfdisk not installed" >> ' + LinkNeoBoot + '/files/modulecheck') + if os.system('opkg list-installed | grep packagegroup-base-nfs') != 0: + os.system('echo "* packagegroup-base-nfs not installed" >> ' + LinkNeoBoot + '/files/modulecheck') if os.system('opkg list-installed | grep ofgwrite') != 0: - os.system('echo "* ofgwrite not installed" >> ' + LinkNeoBoot + '/files/modulecheck') - if os.system('opkg list-installed | grep bzip2') != 0: - os.system('echo "* bzip2 not installed" >> ' + LinkNeoBoot + '/files/modulecheck') + os.system('echo "* ofgwrite not installed" >> ' + LinkNeoBoot + '/files/modulecheck') + if os.system('opkg list-installed | grep bzip2') != 0: + os.system('echo "* bzip2 not installed" >> ' + LinkNeoBoot + '/files/modulecheck') if os.system('opkg list-installed | grep mtd-utils') != 0: - os.system('echo "* mtd-utils not installed" >> ' + LinkNeoBoot + '/files/modulecheck') + os.system('echo "* mtd-utils not installed" >> ' + LinkNeoBoot + '/files/modulecheck') if os.system('opkg list-installed | grep mtd-utils-ubifs') != 0: - os.system('echo "* mtd-utils-ubifs not installed" >> ' + LinkNeoBoot + '/files/modulecheck') - else: + os.system('echo "* mtd-utils-ubifs not installed" >> ' + LinkNeoBoot + '/files/modulecheck') + else: os.system('echo "\n* opkg packed everything is OK !" >> ' + LinkNeoBoot + '/files/modulecheck') - else: + else: os.system('echo "\n* STB is not ARMv7 or MIPS" >> ' + LinkNeoBoot + '/files/modulecheck') cmd = 'echo "\n<====================================================" >> ' + LinkNeoBoot + '/files/modulecheck; cat ' + LinkNeoBoot + '/files/modulecheck' cmd1 = '' self.session.openWithCallback(self.close, Console, _('NeoBoot....'), [cmd, - cmd1]) + cmd1]) self.close() def myClose(self, message): @@ -1262,18 +1262,18 @@ class CheckInstall(Screen): class SkinChange(Screen): if isFHD(): skin = """ - - - - - - - - + + + + + + + + """ else: - skin = ' \n\n \n\n \n \n \n\t\t\t\n \n\n\n\n \n\n ' + skin = ' \n\n \n\n \n \n \n\t\t\t\n \n\n\n\n \n\n ' def __init__(self, session): Screen.__init__(self, session) @@ -1286,12 +1286,12 @@ class SkinChange(Screen): 'ok': self.SkinGO, 'red': self.SkinGO, '9': self.restareE2}) - + self.onShow.append(self.updateInfo) def updateInfo(self): self.skindir = '' + LinkNeoBoot + '/neoskins/' - + if pathExists(self.skindir) == 0 and createDir(self.skindir): pass @@ -1321,14 +1321,14 @@ class SkinChange(Screen): def DefaultSkin(self): cmd = "echo -e '\n\n%s '" % _('Please wait, NeoBot is working, skin change is progress...') cmd1 = "echo -e '\n\n%s '" % _('NeoBoot: Complete Skin Change!') -# cmd2 = 'cp -r ' +LinkNeoBoot+ '/neoskins/default.py ' +LinkNeoBoot+ '/skin.py' +# cmd2 = 'cp -r ' +LinkNeoBoot+ '/neoskins/default.py ' +LinkNeoBoot+ '/skin.py' cmd2 = 'rm -f ' + LinkNeoBoot + '/usedskin.p*; sleep 2' cmd3 = 'ln -sf "neoskins/default.py" "' + LinkNeoBoot + '/usedskin.py"' self.session.open(Console, _('NeoBoot Skin Change'), [cmd, cmd1, cmd2, cmd3]) def doSkinChange(self, answer): if answer is True: - if isFHD(): + if isFHD(): if getBoxHostName() == 'vuultimo4k': system('cp -r ' + LinkNeoBoot + '/images/ultimo4k.png ' + LinkNeoBoot + '/images/box.png') elif getBoxHostName() == 'vusolo4k': @@ -1336,7 +1336,7 @@ class SkinChange(Screen): elif getBoxHostName() == 'vuduo4k': system('cp -r ' + LinkNeoBoot + '/images/duo4k.png ' + LinkNeoBoot + '/images/box.png') elif getBoxHostName() == 'vuduo4kse': - system('cp -r ' + LinkNeoBoot + '/images/duo4k.png ' + LinkNeoBoot + '/images/box.png') + system('cp -r ' + LinkNeoBoot + '/images/duo4k.png ' + LinkNeoBoot + '/images/box.png') elif getBoxHostName() == 'vuuno4k': system('cp -r ' + LinkNeoBoot + '/images/uno4k.png ' + LinkNeoBoot + '/images/box.png') elif getBoxHostName() == 'vuuno4kse': @@ -1344,44 +1344,44 @@ class SkinChange(Screen): elif getBoxHostName() == 'vuzero4kse': system('cp -r ' + LinkNeoBoot + '/images/zero4kse.png ' + LinkNeoBoot + '/images/box.png') elif getBoxHostName() == 'sf4008': - system('cp -r ' + LinkNeoBoot + '/images/sf4008.png ' + LinkNeoBoot + '/images/box.png') + system('cp -r ' + LinkNeoBoot + '/images/sf4008.png ' + LinkNeoBoot + '/images/box.png') elif getBoxHostName() == 'ustym4kpro': - system('cp -r ' + LinkNeoBoot + '/images/ustym4kpro.png ' + LinkNeoBoot + '/images/box.png') + system('cp -r ' + LinkNeoBoot + '/images/ustym4kpro.png ' + LinkNeoBoot + '/images/box.png') elif getBoxHostName() == 'h7' or getBoxHostName() == 'zgemmah7': system('cp -r ' + LinkNeoBoot + '/images/zgmmah7.png ' + LinkNeoBoot + '/images/box.png') elif getBoxHostName() == 'vusolo2': system('cp -r ' + LinkNeoBoot + '/images/solo2.png ' + LinkNeoBoot + '/images/box.png') - + cmd = "echo -e '\n\n%s '" % _('Please wait, NeoBot is working, skin change is progress...') - cmd1 = 'rm -f ' + LinkNeoBoot + '/usedskin.p*; sleep 2' + cmd1 = 'rm -f ' + LinkNeoBoot + '/usedskin.p*; sleep 2' cmd2 = 'sleep 2; cp -r ' + self.skindir + '/' + self.selectedskin + '/*.py ' + LinkNeoBoot + '/usedskin.py' - cmd3 = "echo -e '\n\n%s '" % _('NeoBoot: Complete Skin Change!') - cmd4 = "echo -e '\n\n%s '" % _('To use the new skin please restart enigma2') + cmd3 = "echo -e '\n\n%s '" % _('NeoBoot: Complete Skin Change!') + cmd4 = "echo -e '\n\n%s '" % _('To use the new skin please restart enigma2') self.session.open(Console, _('NeoBoot Skin Change'), [cmd, cmd1, cmd2, cmd3, cmd4]) elif isHD(): cmd = "echo -e '\n\n%s '" % _('Please wait, NeoBot is working, skin change is progress...') - cmd1 = 'rm -f ' + LinkNeoBoot + '/usedskin.p*; sleep 2' + cmd1 = 'rm -f ' + LinkNeoBoot + '/usedskin.p*; sleep 2' cmd2 = 'sleep 2; cp -r ' + self.skindir + '/' + self.selectedskin + '/*.py ' + LinkNeoBoot + '/usedskin.py' cmd3 = "echo -e '\n\n%s '" % _('NeoBoot: Complete Skin Change!') - cmd4 = "echo -e '\n\n%s '" % _('Skin change available only for full hd skin.') - cmd5 = "echo -e '\n\n%s '" % _('Please come back to default skin.') - cmd6 = "echo -e '\n\n%s '" % _('To use the new skin please restart enigma2') + cmd4 = "echo -e '\n\n%s '" % _('Skin change available only for full hd skin.') + cmd5 = "echo -e '\n\n%s '" % _('Please come back to default skin.') + cmd6 = "echo -e '\n\n%s '" % _('To use the new skin please restart enigma2') self.session.open(Console, _('NeoBoot Skin Change'), [cmd, cmd1, cmd2, cmd3, cmd4, cmd5, cmd6]) - + else: self.close() def checkimageskin(self): - if fileCheck('/etc/vtiversion.info'): -# fail = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/usedskin.py' + if fileCheck('/etc/vtiversion.info'): +# fail = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/usedskin.py' # f = open(fail, 'r') # content = f.read() -# f.close() +# f.close() # localfile2 = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/usedskin.py' # temp_file2 = open(localfile2, 'w') # temp_file2.write(content.replace('selektor.png', 'slekvti.png')) -# temp_file2.close() - self.restareE2() +# temp_file2.close() + self.restareE2() else: self.restareE2() @@ -1398,22 +1398,22 @@ class SkinChange(Screen): class BlocUnblockImageSkin(Screen): __module__ = __name__ - skin = """ - - - - - - + skin = """ + + + + + + """ def __init__(self, session): Screen.__init__(self, session) - self['lab1'] = Label(_('Block or unblock the neoboot skin display in the system skin.')) - self['key_red'] = Label(_('Block or unlock skins.')) + self['lab1'] = Label(_('Block or unblock the neoboot skin display in the system skin.')) + self['key_red'] = Label(_('Block or unlock skins.')) self['list'] = List([]) self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'back': self.restareE2, - 'red': self.deleteback}) + 'red': self.deleteback}) self.backupdir = '/usr/share/enigma2' self.onShow.append(self.updateInfo) @@ -1421,7 +1421,7 @@ class BlocUnblockImageSkin(Screen): self.backupdir = '/usr/share/enigma2' if pathExists(self.backupdir) == 0 and createDir(self.backupdir): pass - + imageslist = [] for fn in listdir(self.backupdir): imageslist.append(fn) @@ -1432,7 +1432,7 @@ class BlocUnblockImageSkin(Screen): image = self['list'].getCurrent() self.delimage = image.strip() if fileExists(self.backupdir + '/' + self.delimage + '/skin.xml'): - self.deleteback2() + self.deleteback2() else: self.myClose(_('Sorry, not find skin neoboot.')) @@ -1440,29 +1440,29 @@ class BlocUnblockImageSkin(Screen): image = self['list'].getCurrent() if image: self.delimage = image.strip() - message = (_('Select Yes to lock or No to unlock.\n %s ?') % image) + message = (_('Select Yes to lock or No to unlock.\n %s ?') % image) ybox = self.session.openWithCallback(self.Block_Unlock_Skin, MessageBox, message, MessageBox.TYPE_YESNO) ybox.setTitle(_('Confirmation...')) def Block_Unlock_Skin(self, answer): - if answer is True: + if answer is True: fail = self.backupdir + '/' + self.delimage + '/skin.xml' f = open(fail, 'r') content = f.read() - f.close() - localfile2 = self.backupdir + '/' + self.delimage + '/skin.xml' + f.close() + localfile2 = self.backupdir + '/' + self.delimage + '/skin.xml' temp_file2 = open(localfile2, 'w') temp_file2.write(content.replace('NeoBootImageChoose', 'neoBootImageChoose')) - temp_file2.close() - else: + temp_file2.close() + else: fail = self.backupdir + '/' + self.delimage + '/skin.xml' f = open(fail, 'r') content = f.read() - f.close() - localfile2 = self.backupdir + '/' + self.delimage + '/skin.xml' + f.close() + localfile2 = self.backupdir + '/' + self.delimage + '/skin.xml' temp_file2 = open(localfile2, 'w') temp_file2.write(content.replace('neoBootImageChoose', 'NeoBootImageChoose')) - temp_file2.close() + temp_file2.close() def restareE2(self): restartbox = self.session.openWithCallback(self.restartGUI, MessageBox, _('GUI needs a restart.\nDo you want to Restart the GUI now?'), MessageBox.TYPE_YESNO) @@ -1475,7 +1475,7 @@ class BlocUnblockImageSkin(Screen): self.close() def myClose(self, message): - self.session.open(MessageBox, message, MessageBox.TYPE_INFO) + self.session.open(MessageBox, message, MessageBox.TYPE_INFO) self.close() @@ -1493,64 +1493,64 @@ class InternalFlash(Screen): self['key_red'] = Label(_('Start - Red')) self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'back': self.close, 'red': self.mountIF}) - + def mountIF(self): if fileExists('/.multinfo') and getCPUtype() != 'MIPS': - self.mountinternalflash() + self.mountinternalflash() else: self.myClose(_('Sorry, the operation is not possible from Flash or not supported.')) self.close() def mountinternalflash(self): - if fileExists('/.multinfo') and getCPUtype() == 'ARMv7': + if fileExists('/.multinfo') and getCPUtype() == 'ARMv7': if os.path.exists('/proc/stb/info/boxtype'): - if getBoxHostName == 'sf4008': #getCPUSoC() == 'bcm7251' - os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p4 /media/InternalFlash') + if getBoxHostName == 'sf4008': #getCPUSoC() == 'bcm7251' + os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p4 /media/InternalFlash') if os.path.exists('/proc/stb/info/boxtype'): - if getBoxHostName == 'et1x000': #getCPUSoC() == 'bcm7251' or - os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p4 /media/InternalFlash') + if getBoxHostName == 'et1x000': #getCPUSoC() == 'bcm7251' or + os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p4 /media/InternalFlash') if os.path.exists('/proc/stb/info/boxtype'): - if getBoxHostName == 'ax51': #getCPUSoC() == 'bcm7251s' or - os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p4 /media/InternalFlash') + if getBoxHostName == 'ax51': #getCPUSoC() == 'bcm7251s' or + os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p4 /media/InternalFlash') if os.path.exists('/proc/stb/info/boxtype'): - if getCPUSoC() == 'bcm7251s' or getBoxHostName() == 'h7' or getBoxHostName() == 'zgemmah7': + if getCPUSoC() == 'bcm7251s' or getBoxHostName() == 'h7' or getBoxHostName() == 'zgemmah7': os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p3 /media/InternalFlash') if os.path.exists('/proc/stb/info/boxtype'): - if getBoxHostName() == 'zgemmah9s': + if getBoxHostName() == 'zgemmah9s': os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p7 /media/InternalFlash') - + # if os.path.exists('/proc/stb/info/boxtype'): -# if getBoxHostName() == 'zgemmah9combo': -# os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p7 /media/InternalFlash') +# if getBoxHostName() == 'zgemmah9combo': +# os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p7 /media/InternalFlash') - if getBoxHostName == 'sf8008': - os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p13 /media/InternalFlash') + if getBoxHostName == 'sf8008': + os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p13 /media/InternalFlash') - if getBoxHostName == 'ax60': + if getBoxHostName == 'ax60': os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p21 /media/InternalFlash') - if getBoxHostName() == 'ustym4kpro' or getTunerModel() == 'ustym4kpro': + if getBoxHostName() == 'ustym4kpro' or getTunerModel() == 'ustym4kpro': os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p13 /media/InternalFlash') if os.path.exists('/proc/stb/info/model'): - if getTunerModel() == 'dm900' or getCPUSoC() == 'BCM97252SSFF': + if getTunerModel() == 'dm900' or getCPUSoC() == 'BCM97252SSFF': os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p2 /media/InternalFlash') - + if getBoxVuModel() == 'uno4kse' or getBoxVuModel() == 'uno4k' or getBoxVuModel() == 'ultimo4k' or getBoxVuModel() == 'solo4k': os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p4 /media/InternalFlash') if getBoxVuModel() == 'zero4k': os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p7 /media/InternalFlash') - if getBoxVuModel() == 'duo4k': + if getBoxVuModel() == 'duo4k': os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p9 /media/InternalFlash') - if getBoxVuModel() == 'duo4kse': - os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p9 /media/InternalFlash') + if getBoxVuModel() == 'duo4kse': + os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p9 /media/InternalFlash') if getCPUSoC() == 'bcm7252s' or getBoxHostName() == 'gbquad4k': os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p5 /media/InternalFlash') @@ -1573,23 +1573,23 @@ class InternalFlash(Screen): class DeletingLanguages(Screen): __module__ = __name__ - skin = """ - - - - - - + skin = """ + + + + + + """ def __init__(self, session): Screen.__init__(self, session) self['lab1'] = Label(_('Select to delete.')) - self['key_red'] = Label(_('Delete file')) + self['key_red'] = Label(_('Delete file')) self['list'] = List([]) self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'back': self.close, 'ok': self.deleteback, - 'red': self.deleteback}) + 'red': self.deleteback}) self.backupdir = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/locale' self.onShow.append(self.updateInfo) @@ -1597,7 +1597,7 @@ class DeletingLanguages(Screen): self.backupdir = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/locale' if pathExists(self.backupdir) == 0 and createDir(self.backupdir): pass - + imageslist = [] for fn in listdir(self.backupdir): imageslist.append(fn) @@ -1608,7 +1608,7 @@ class DeletingLanguages(Screen): image = self['list'].getCurrent() if image: self.delimage = image.strip() - message = (_('File: %s remove ?') % image) + message = (_('File: %s remove ?') % image) ybox = self.session.openWithCallback(self.dodeleteback, MessageBox, message, MessageBox.TYPE_YESNO) ybox.setTitle(_('Confirmation of Deletion...')) @@ -1638,19 +1638,19 @@ class ATVcamfeed(Screen): 'red': self.addcamatv}) def addcamatv(self): - if getImageATv() == 'okfeedCAMatv': + if getImageATv() == 'okfeedCAMatv': cmd = "echo -e '\n\n%s '" % _('NeoBoot - ATV add cam feed ...') - cmd1 = 'wget -O - -q http://updates.mynonpublic.com/oea/feed | bash' + cmd1 = 'wget -O - -q http://updates.mynonpublic.com/oea/feed | bash' self.session.open(Console, _('NeoBoot: Cams feed add...'), [cmd, cmd1]) - elif getImageATv() != 'okfeedCAMatv': + elif getImageATv() != 'okfeedCAMatv': self.myClose(_('Sorry, is not image Open ATV !!!')) def myClose(self, message): self.session.open(MessageBox, message, MessageBox.TYPE_INFO) self.close() - - + + class TunerInfo(Screen): __module__ = __name__ skin = """ @@ -1665,20 +1665,20 @@ class TunerInfo(Screen): self['key_red'] = Label(_('Start - Red')) self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'back': self.close, 'red': self.iNFO}) - + def iNFO(self): try: cmd = ' cat ' + LinkNeoBoot + '/stbinfo.cfg' cmd1 = '' self.session.openWithCallback(self.close, Console, _('NeoBoot....'), [cmd, - cmd1]) + cmd1]) self.close() except: False - -class CreateSwap(Screen): + +class CreateSwap(Screen): __module__ = __name__ skin = """ @@ -1692,54 +1692,54 @@ class CreateSwap(Screen): self['key_red'] = Label(_('Start create file swap.')) self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'back': self.close, 'red': self.CreateSwap}) - + def CreateSwap(self): if os.path.exists('/media/hdd/ImageBoot/.neonextboot'): if not os.path.exists('/media/hdd/swapfile'): - cmd0 = "echo -e '\n\n%s '" % _('Creation swap 512MB, please wait...') + cmd0 = "echo -e '\n\n%s '" % _('Creation swap 512MB, please wait...') cmd1 = 'dd if=/dev/zero of=/media/hdd/swapfile bs=1024 count=524288' cmd2 = 'mkswap /media/hdd/swapfile' - cmd3 = 'swapon /media/hdd/swapfile' - cmd4 = 'echo "/media/hdd/swapfile swap swap defaults 0 0 " >> /etc/fstab' + cmd3 = 'swapon /media/hdd/swapfile' + cmd4 = 'echo "/media/hdd/swapfile swap swap defaults 0 0 " >> /etc/fstab' cmd5 = 'echo "/sbin/swapon /hdd/swapfile; swapon -a " > /etc/init.d/rcS.local' - cmd6 = 'chmod 755 /etc/init.d/rcS.local; chmod 755 /media/hdd/swapfile; /sbin/swapon /hdd/swapfile' - cmd7 = "echo -e '\n\n%s '" % _('Creation complete swap 512MB') - self.session.open(Console, _('NeoBoot....'), [cmd0, - cmd1, - cmd2, - cmd3, - cmd4, - cmd5, - cmd6, - cmd7]) + cmd6 = 'chmod 755 /etc/init.d/rcS.local; chmod 755 /media/hdd/swapfile; /sbin/swapon /hdd/swapfile' + cmd7 = "echo -e '\n\n%s '" % _('Creation complete swap 512MB') + self.session.open(Console, _('NeoBoot....'), [cmd0, + cmd1, + cmd2, + cmd3, + cmd4, + cmd5, + cmd6, + cmd7]) else: - self.myClose(_('The file swapfile already exists!')) - elif os.path.exists('/media/usb/ImageBoot/.neonextboot'): + self.myClose(_('The file swapfile already exists!')) + elif os.path.exists('/media/usb/ImageBoot/.neonextboot'): if not os.path.exists('/media/usb/swapfile'): - cmd0 = "echo -e '\n\n%s '" % _('Creation swap 512MB, please wait...') + cmd0 = "echo -e '\n\n%s '" % _('Creation swap 512MB, please wait...') cmd1 = 'dd if=/dev/zero of=/media/usb/swapfile bs=1024 count=524288' cmd2 = 'mkswap /media/usb/swapfile' - cmd3 = 'swapon /media/usb/swapfile' - cmd4 = 'echo "/media/usb/swapfile swap swap defaults 0 0 " >> /etc/fstab' + cmd3 = 'swapon /media/usb/swapfile' + cmd4 = 'echo "/media/usb/swapfile swap swap defaults 0 0 " >> /etc/fstab' cmd5 = 'echo "/sbin/swapon /usb/swapfile; swapon -a " > /etc/init.d/rcS.local' - cmd6 = 'chmod 755 /etc/init.d/rcS.local; chmod 755 /media/usb/swapfile; /sbin/swapon /usb/swapfile' - cmd7 = "echo -e '\n\n%s '" % _('Creation complete swap 512MB') - self.session.open(Console, _('NeoBoot....'), [cmd0, - cmd1, - cmd2, - cmd3, - cmd4, - cmd5, - cmd6, - cmd7]) - else: + cmd6 = 'chmod 755 /etc/init.d/rcS.local; chmod 755 /media/usb/swapfile; /sbin/swapon /usb/swapfile' + cmd7 = "echo -e '\n\n%s '" % _('Creation complete swap 512MB') + self.session.open(Console, _('NeoBoot....'), [cmd0, + cmd1, + cmd2, + cmd3, + cmd4, + cmd5, + cmd6, + cmd7]) + else: self.myClose(_('The file swapfile already exists!')) - else: + else: self.myClose(_('The folder hdd or usb not exists!')) def myClose(self, message): self.session.open(MessageBox, message, MessageBox.TYPE_INFO) - self.close() + self.close() class MultiBootMyHelp(Screen): @@ -1773,7 +1773,7 @@ class MultiBootMyHelp(Screen): message += 'ubi_reader by Jason Pruitt - Thanks\n\n' message += 'Translation by gutosie and other people!\n\n' message += _('Thank you to everyone not here for helping to improve NeoBoot \n\n') - message += _('Successful fun :)\n\n') + message += _('Successful fun :)\n\n') self['lab1'].show() self['lab1'].setText(message) @@ -1792,7 +1792,7 @@ class MyHelpNeo(Screen): __module__ = __name__ - def __init__(self, session): + def __init__(self, session): Screen.__init__(self, session) self['lab1'] = ScrollLabel('') self['actions'] = ActionMap(['WizardActions', 'ColorActions', 'DirectionActions'], {'back': self.close, @@ -1804,7 +1804,7 @@ class MyHelpNeo(Screen): self['lab1'].hide() self.updatetext() - def updatetext(self): + def updatetext(self): message = _('NeoBoot Ver. ' + PLUGINVERSION + ' Enigma2\n\nDuring the entire installation process does not restart the receiver !!!\n\n') message += _('NeoBoot Ver. updates ' + UPDATEVERSION + ' \n\n') message = _('For proper operation NeoBota type device is required USB stick or HDD, formatted on your system files Linux ext3 or ext4..\n\n') @@ -1814,8 +1814,8 @@ class MyHelpNeo(Screen): message += _('4. Install the needed packages...\n\n') message += _('5. For proper installation NenoBota receiver must be connected to the Internet.\n\n') message += _('6. In the event of a problem with the installation cancel and inform the author of the plug of a problem.\n\n') - message += _('Buy a satellite tuner in the store: http://www.expert-tvsat.com/\n') - message += _('Have fun !!!') + message += _('Buy a satellite tuner in the store: http://www.expert-tvsat.com/\n') + message += _('Have fun !!!') self['lab1'].show() self['lab1'].setText(message) @@ -1829,11 +1829,11 @@ class Opis(Screen): - + - + - """ + """ else: skin = """ @@ -1849,14 +1849,14 @@ class Opis(Screen): """ __module__ = __name__ - def __init__(self, session): + def __init__(self, session): Screen.__init__(self, session) self['key_red'] = Label(_('Remove NeoBoot of STB')) self['key_green'] = Label(_('Instal neoobot from github')) self['lab1'] = ScrollLabel('') self['actions'] = ActionMap(['WizardActions', 'ColorActions', 'DirectionActions'], {'back': self.close, 'red': self.delete, - 'green': self.neoinstallgithub, + 'green': self.neoinstallgithub, 'ok': self.close, 'up': self['lab1'].pageUp, 'left': self['lab1'].pageUp, @@ -1865,23 +1865,23 @@ class Opis(Screen): self['lab1'].hide() self.updatetext() - def updatetext(self): + def updatetext(self): message = _('\\ NeoBoot Ver. ' + PLUGINVERSION + ' - NeoBoot Ver. updates ' + UPDATEVERSION + '//\n\n') message += _('\----------NEOBOOT - VIP FULL VERSION----------/\n') - message += _('Get the full version of the multiboot plugin.\n') - message += _('Send an e-mail request for the neoboot vip version.\n') + message += _('Get the full version of the multiboot plugin.\n') + message += _('Send an e-mail request for the neoboot vip version.\n') message += _('e-mail: krzysztofgutosie@gmail.com\n\n') message += _('----------------Free donate----------------\n') - message += _('Spendenbetrag\nDonaco\nDarowizna\nПожертвование\n') - message += _('Donate to the project\n') + message += _('Spendenbetrag\nDonaco\nDarowizna\nПожертвование\n') + message += _('Donate to the project\n') message += _('- Access to the latest version\n') message += _('- Online support\n') - message += _('- Full version\n') + message += _('- Full version\n') message += _('- More information email\n') message += _('We thank you for any help\n') message += _('If you want to support the neoboot project, you can do so by contacting us by e-mail:\n') message += _(' krzysztofgutosie@gmail.com\n\n') - message += _(' PayPal adress: krzysztofgutosie@gmail.com\n') + message += _(' PayPal adress: krzysztofgutosie@gmail.com\n') message += _('---------------- ¯\_(ツ)_/¯ ----------------\n\n') message += _('1. Requirements: For proper operation of the device NeoBota are required USB stick or HDD.\n\n') message += _('2. NeoBot is fully automated\n\n') @@ -1891,68 +1891,68 @@ class Opis(Screen): message += _('6. The installed to multiboot images, it is not indicated update to a newer version.\n\n') message += _('The authors plug NeoBot not liable for damage a receiver, NeoBoota incorrect use or installation of unauthorized additions or images.!!!\n\n') message += _('\nCompletely uninstall NeoBota: \nIf you think NeoBot not you need it, you can uninstall it.\nTo uninstall now press the red button on the remote control.\n\n') - message += _('Have fun !!!') + message += _('Have fun !!!') self['lab1'].show() self['lab1'].setText(message) - def neoinstallgithub(self): + def neoinstallgithub(self): message = _('Are you sure you want to reinstall neoboot from github.') ybox = self.session.openWithCallback(self.neogithub, MessageBox, message, MessageBox.TYPE_YESNO) ybox.setTitle(_('Install.')) - def neogithub(self, answer): - if answer is True: - if fileExists('' + LinkNeoBoot + '/.location'): - system('rm -f ' + LinkNeoBoot + '/.location') - if fileExists('/usr/bin/curl'): + def neogithub(self, answer): + if answer is True: + if fileExists('' + LinkNeoBoot + '/.location'): + system('rm -f ' + LinkNeoBoot + '/.location') + if fileExists('/usr/bin/curl'): cmd1 = 'rm -f /usr/lib/periodon/.kodn; curl -kLs https://raw.githubusercontent.com/gutosie/neoboot/master/iNB.sh|sh' self.session.open(Console, _('NeoBoot....'), [cmd1]) self.close() - elif fileExists('/usr/bin/wget'): + elif fileExists('/usr/bin/wget'): cmd1 = 'rm -f /usr/lib/periodon/.kodn; cd /tmp; rm ./*.sh; wget --no-check-certificate https://raw.githubusercontent.com/gutosie/neoboot/master/iNB.sh;chmod 755 ./iNB.sh;sh ./iNB.sh; rm ./iNB.sh; cd /' self.session.open(Console, _('NeoBoot....'), [cmd1]) - self.close() - elif fileExists('/usr/bin/fullwget'): + self.close() + elif fileExists('/usr/bin/fullwget'): cmd1 = 'rm -f /usr/lib/periodon/.kodn; cd /tmp; rm ./*.sh; fullwget --no-check-certificate https://raw.githubusercontent.com/gutosie/neoboot/master/iNB.sh;chmod 755 ./iNB.sh;sh ./iNB.sh; rm ./iNB.sh; cd /' self.session.open(Console, _('NeoBoot....'), [cmd1]) - self.close() + self.close() else: pass else: - self.close() + self.close() - def delete(self): + def delete(self): message = _('Are you sure you want to completely remove NeoBoota of your image?\n\nIf you choose so all directories NeoBoota will be removed.\nA restore the original image settings Flash.') ybox = self.session.openWithCallback(self.mbdelete, MessageBox, message, MessageBox.TYPE_YESNO) ybox.setTitle(_('Removed successfully.')) - def mbdelete(self, answer): - if answer is True: + def mbdelete(self, answer): + if answer is True: if fileExists('/etc/fstab.org'): - system('rm -r /etc/fstab; mv /etc/fstab.org /etc/fstab') + system('rm -r /etc/fstab; mv /etc/fstab.org /etc/fstab') if fileExists('/etc/init.d/volatile-media.sh.org'): - system(' mv /etc/init.d/volatile-media.sh.org /etc/init.d/volatile-media.sh; rm -r /etc/init.d/volatile-media.sh.org; chmod 755 /etc/init.d/volatile-media.sh ') - if os.path.isfile('%sImageBoot/.neonextboot' % getNeoLocation()): + system(' mv /etc/init.d/volatile-media.sh.org /etc/init.d/volatile-media.sh; rm -r /etc/init.d/volatile-media.sh.org; chmod 755 /etc/init.d/volatile-media.sh ') + if os.path.isfile('%sImageBoot/.neonextboot' % getNeoLocation()): os.system('rm -f /etc/neoimage; rm -f /etc/imageboot; rm -f %sImageBoot/.neonextboot; rm -f %sImageBoot/.version; rm -f %sImageBoot/.Flash; ' % (getNeoLocation(), getNeoLocation(), getNeoLocation())) - if os.path.isfile('%sImagesUpload/.kernel ' % getNeoLocation()): + if os.path.isfile('%sImagesUpload/.kernel ' % getNeoLocation()): os.system('rm -r %sImagesUpload/.kernel' % getNeoLocation()) cmd = "echo -e '\n\n%s '" % _('Recovering setting....\n') - cmd1 = 'rm -R ' + LinkNeoBoot + '' - cmd2 = 'rm -R /sbin/neoinit*' - cmd3 = 'ln -sfn /sbin/init.sysvinit /sbin/init' - cmd4 = 'rm -rf /usr/lib/enigma2/python/Tools/Testinout.p*' + cmd1 = 'rm -R ' + LinkNeoBoot + '' + cmd2 = 'rm -R /sbin/neoinit*' + cmd3 = 'ln -sfn /sbin/init.sysvinit /sbin/init' + cmd4 = 'rm -rf /usr/lib/enigma2/python/Tools/Testinout.p*' cmd5 = 'rm -rf /usr/lib/periodon' - cmd6 = 'opkg install --force-maintainer --force-reinstall --force-overwrite --force-downgrade volatile-media; sleep 10; PATH=/sbin:/bin:/usr/sbin:/usr/bin; echo -n "Rebooting... "; reboot -d -f' + cmd6 = 'opkg install --force-maintainer --force-reinstall --force-overwrite --force-downgrade volatile-media; sleep 10; PATH=/sbin:/bin:/usr/sbin:/usr/bin; echo -n "Rebooting... "; reboot -d -f' self.session.open(Console, _('NeoBot was removed !!! \nThe changes will be visible only after complete restart of the receiver.'), [cmd, cmd1, cmd2, cmd3, cmd4, - cmd5, + cmd5, cmd6]) self.close() else: - self.close() + self.close() class ReinstallKernel(Screen): @@ -1962,7 +1962,7 @@ class ReinstallKernel(Screen): - """ + """ def __init__(self, session): Screen.__init__(self, session) @@ -1985,7 +1985,7 @@ class ReinstallKernel(Screen): mess = _('Update available only from the image Flash.') self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) else: - self.kernel_update() + self.kernel_update() else: self.kernel_update() @@ -1994,7 +1994,7 @@ class ReinstallKernel(Screen): os.system('echo "Flash " > ' + getNeoLocation() + 'ImageBoot/.neonextboot') out = open('' + getNeoLocation() + 'ImagesUpload/.kernel/used_flash_kernel', 'w') out.write('Used Kernel: Flash') - out.close() + out.close() cmd1 = 'rm -f /home/root/*.ipk; opkg download kernel-image; sleep 2; opkg install --force-maintainer --force-reinstall --force-overwrite --force-downgrade /home/root/*.ipk; opkg configure update-modules; rm -f /home/root/*.ipk' self.session.open(Console, _('NeoBoot....'), [cmd1]) self.close() @@ -2012,7 +2012,7 @@ class neoDONATION(Screen): __module__ = __name__ - def __init__(self, session): + def __init__(self, session): Screen.__init__(self, session) self['lab1'] = ScrollLabel('') self['actions'] = ActionMap(['WizardActions', 'ColorActions', 'DirectionActions'], {'back': self.close, @@ -2024,20 +2024,20 @@ class neoDONATION(Screen): self['lab1'].hide() self.updatetext() - def updatetext(self): + def updatetext(self): message = _('NeoBoot Ver. ' + PLUGINVERSION + ' Enigma2\n\n') message += _('NeoBoot Ver. updates ' + UPDATEVERSION + ' \n\n') message += _('----------------Free donate----------------\n\n') - message += _('Spendenbetrag\nDonaco\nDarowizna\nПожертвование\n') - message += _('Donate to the project\n') + message += _('Spendenbetrag\nDonaco\nDarowizna\nПожертвование\n') + message += _('Donate to the project\n') message += _('- Access to the latest version\n') message += _('- Online support\n') message += _('- More information email\n') message += _('We thank you for any help\n') - message += _('If you want to support the neoboot project, you can do so by contacting us by e-mail:\n') - message += _(' krzysztofgutosie@gmail.com\n\n') - message += _(' PayPal adress: krzysztofgutosie@gmail.com\n') - message += _('----------------Free donate----------------\n') + message += _('If you want to support the neoboot project, you can do so by contacting us by e-mail:\n') + message += _(' krzysztofgutosie@gmail.com\n\n') + message += _(' PayPal adress: krzysztofgutosie@gmail.com\n') + message += _('----------------Free donate----------------\n') message += _('¯\_(ツ)_/¯ Have fun !!!') self['lab1'].show() self['lab1'].setText(message) diff --git a/NeoBoot/neoskins/darog69/skin_darog69.py b/NeoBoot/neoskins/darog69/skin_darog69.py index b93ec20..513062f 100644 --- a/NeoBoot/neoskins/darog69/skin_darog69.py +++ b/NeoBoot/neoskins/darog69/skin_darog69.py @@ -9,7 +9,7 @@ ImageChooseFULLHD = """ - + @@ -21,10 +21,10 @@ ImageChooseFULLHD = """ - - + + - + @@ -40,20 +40,20 @@ ImageChooseFULLHD = """ - + - - + + - - - - + + + + - + """ ### diff --git a/NeoBoot/neoskins/darog69_Ustym4kpro/skin_darog69_Ustym4kpro.py b/NeoBoot/neoskins/darog69_Ustym4kpro/skin_darog69_Ustym4kpro.py index a133682..abaa265 100644 --- a/NeoBoot/neoskins/darog69_Ustym4kpro/skin_darog69_Ustym4kpro.py +++ b/NeoBoot/neoskins/darog69_Ustym4kpro/skin_darog69_Ustym4kpro.py @@ -51,11 +51,9 @@ ImageChooseFULLHD = """ - + - + """ ### - - diff --git a/NeoBoot/neoskins/default.py b/NeoBoot/neoskins/default.py index fc47ce5..9c1cec8 100644 --- a/NeoBoot/neoskins/default.py +++ b/NeoBoot/neoskins/default.py @@ -4,23 +4,23 @@ from Screens.Screen import Screen from Components.Pixmap import Pixmap import os -#Colors (#AARRGGBB) +#Colors (#AARRGGBB) #____Recommended colors - Zalecane kolory : -#color name="white" value="#ffffff" -#color name="darkwhite" value="#00dddddd" -#color name="red" value="#f23d21" -#color name="green" value="#389416" -#color name="blue" value="#0064c7" -#color name="yellow" value="#bab329" -#color name="orange" value="#00ffa500" -#color name="gray" value="#808080" -#color name="lightgrey" value="#009b9b9b" +#color name="white" value="#ffffff" +#color name="darkwhite" value="#00dddddd" +#color name="red" value="#f23d21" +#color name="green" value="#389416" +#color name="blue" value="#0064c7" +#color name="yellow" value="#bab329" +#color name="orange" value="#00ffa500" +#color name="gray" value="#808080" +#color name="lightgrey" value="#009b9b9b" # green = '#00389416' lub #00389416 # red = '#00ff2525' # yellow = '#00ffe875' # orange = '#00ff7f50' # seledynowy = #00FF00 -# jasny-blue = #99FFFF +# jasny-blue = #99FFFF # Zamiast font=Regular ktory nie rozpoznaje polskich znakow np. na VTi, mozesz zmienic na ponizsze font="*: # font - genel @@ -28,15 +28,15 @@ import os # font - tasat # font - dugme -# +# ###____ Skin Ultra HD - ImageChooseFULLHD ___ mod. gutosie___ -ImageChooseFULLHD = """ +ImageChooseFULLHD = """ - - - + + + @@ -55,10 +55,10 @@ ImageChooseFULLHD = """ - - - - + + + + @@ -90,99 +90,99 @@ ImageChooseFULLHD = """ ###____ Skin Ultra HD - ImageChooseULTRAHD ___ mod. gutosie___ ImageChooseULTRAHD = """ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - Default + Default - Format:%A + Format:%A Format:%e. %b. - + """ ###____ Skin HD - ImageChoose ___mod. gutosie ___ ImageChooseHD = """ -\n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n - \n +\n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n + \n \n \n - \n + \n Default - \n + \n Format:%A - \n + \n Format:%e. %b. \n @@ -210,20 +210,20 @@ MyUpgradeFULLHD = """ ###____ Skin UltraHD - MyUpgradeUltraHD ___mod. gutosie ___ MyUpgradeUltraHD = """ - - - - + + + + {"template": [MultiContentEntryText(pos=(0,0), size=(1680,132), flags=RT_HALIGN_CENTER|RT_VALIGN_CENTER, text=0)], "fonts": [gFont("Regular",66)], "itemHeight":132}\n - - - - - - + + + + + + """ - + ###____ Skin MyUpgradeHD - MyUpgradeHD ___mod. gutosie ___ MyUpgradeHD = """ @@ -241,9 +241,9 @@ MyUpgradeHD = """ - """ - - + """ + + ###____ Skin NeoBootInstallationFULLHD - NeoBootInstallationFULLHD ___mod. gutosie ___ NeoBootInstallationFULLHD = """ @@ -268,31 +268,31 @@ NeoBootInstallationFULLHD = """ ###____ Skin NeoBootInstallationUltraHD - NeoBootInstallationUltraHD ___mod. gutosie ___ NeoBootInstallationUltraHD = """ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + Default - + Format:%A - + Format:%e. %b. """ @@ -305,20 +305,13 @@ NeoBootInstallationHD = """ - - - - - - - - + + + + + + + + """ - - - - - - - diff --git a/NeoBoot/neoskins/mercus/mercus_skin.py b/NeoBoot/neoskins/mercus/mercus_skin.py index 74a63f4..37128ad 100644 --- a/NeoBoot/neoskins/mercus/mercus_skin.py +++ b/NeoBoot/neoskins/mercus/mercus_skin.py @@ -6,10 +6,10 @@ import os # mercus = /neoskins/mercus/mercus_skin.py ### ImageChooseFULLHD - mercus -ImageChooseFULLHD = """ +ImageChooseFULLHD = """ - + @@ -46,7 +46,7 @@ ImageChooseFULLHD = """ - + diff --git a/NeoBoot/neoskins/metrix/metrix_skin.py b/NeoBoot/neoskins/metrix/metrix_skin.py index aafe96b..d302a40 100644 --- a/NeoBoot/neoskins/metrix/metrix_skin.py +++ b/NeoBoot/neoskins/metrix/metrix_skin.py @@ -5,54 +5,54 @@ import os # skin /neoskins/matrix/matrix_skin.py - mod.gutosie -### ImageChooseFULLHD -ImageChooseFULLHD = """ - - - - - - - - - - - - +### ImageChooseFULLHD +ImageChooseFULLHD = """ + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + Default - + Format:%A - + Format:%e. %b. diff --git a/NeoBoot/neoskins/neo/neo_skin.py b/NeoBoot/neoskins/neo/neo_skin.py index 1cd4b58..d3034a3 100644 --- a/NeoBoot/neoskins/neo/neo_skin.py +++ b/NeoBoot/neoskins/neo/neo_skin.py @@ -5,17 +5,17 @@ from Components.Pixmap import Pixmap import os -#Colors (#AARRGGBB) +#Colors (#AARRGGBB) #____Recommended colors - Zalecane kolory : -#color name="white" value="#ffffff" -#color name="darkwhite" value="#00dddddd" -#color name="red" value="#f23d21" -#color name="green" value="#389416" -#color name="blue" value="#0064c7" -#color name="yellow" value="#bab329" -#color name="orange" value="#00ffa500" -#color name="gray" value="#808080" -#color name="lightgrey" value="#009b9b9b" +#color name="white" value="#ffffff" +#color name="darkwhite" value="#00dddddd" +#color name="red" value="#f23d21" +#color name="green" value="#389416" +#color name="blue" value="#0064c7" +#color name="yellow" value="#bab329" +#color name="orange" value="#00ffa500" +#color name="gray" value="#808080" +#color name="lightgrey" value="#009b9b9b" # font genel # font baslk @@ -25,91 +25,91 @@ import os #jak by chcial ktos wlasny selektor, to przyklad: # -### ImageChooseFULLHD -ImageChooseFULLHD = """ - +### ImageChooseFULLHD +ImageChooseFULLHD = """ + - - - - - - - - + + + + + + + + - - - + + + - + - - + + - - + + - -#Window image selection - Okno wyboru image - + +#Window image selection - Okno wyboru image + #Used Kernel: #More options - Menu - + -#key 1> 2> 3> +#key 1> 2> 3> - + - -#Please choose an image to boot - -#NeoBoot is running from: +#Please choose an image to boot + + +#NeoBoot is running from: - -#NeoBoot is running image: + +#NeoBoot is running image: - - -#Memory disc: - Pamiec dysku + + +#Memory disc: - Pamiec dysku - + #Number of images installed: - - -#Version update: + + +#Version update: #UPDATEVERSION - + + +#NeoBoot version: + +#PLUGINVERSION + + +#Kernel Version + +#KERNELVERSION + -#NeoBoot version: - -#PLUGINVERSION - - -#Kernel Version - -#KERNELVERSION - - #hostname - + #Memory - Used: Available: @@ -117,9 +117,8 @@ ImageChooseFULLHD = """ #VIP - + """ -###ImageChoose-HD - +###ImageChoose-HD diff --git a/NeoBoot/neoskins/oldhd/hd_skin.py b/NeoBoot/neoskins/oldhd/hd_skin.py index 6cd4f38..7f4ea4b 100644 --- a/NeoBoot/neoskins/oldhd/hd_skin.py +++ b/NeoBoot/neoskins/oldhd/hd_skin.py @@ -6,11 +6,11 @@ import os ###____ Skin HD - ImageChoose ___mod. gutosie ___ ImageChooseHD = """ - - - - - + + + + + @@ -28,7 +28,7 @@ ImageChooseHD = """ - + @@ -46,6 +46,6 @@ ImageChooseHD = """ Format:%-H:%M - + """ diff --git a/NeoBoot/plugin.py b/NeoBoot/plugin.py index 56e9778..80e5cdb 100644 --- a/NeoBoot/plugin.py +++ b/NeoBoot/plugin.py @@ -1,9 +1,9 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- -####################### _q(-_-)p_ gutosie _q(-_-)p_ ####################### +####################### _q(-_-)p_ gutosie _q(-_-)p_ ####################### # Copyright (c) , gutosie license -# -# Redystrybucja wersji programu i dokonywania modyfikacji JEST DOZWOLONE, pod warunkiem zachowania niniejszej informacji o prawach autorskich. +# +# Redystrybucja wersji programu i dokonywania modyfikacji JEST DOZWOLONE, pod warunkiem zachowania niniejszej informacji o prawach autorskich. # Autor NIE ponosi JAKIEJKOLWIEK odpowiedzialnoĹ›ci za skutki uĹĽtkowania tego programu oraz za wykorzystanie zawartych tu informacji. # Modyfikacje przeprowadzasz na wlasne ryzyko!!! # O wszelkich zmianach prosze poinformować na http://all-forum.cba.pl w temacie pod nazwa -#[NEOBOOT]#- @@ -12,15 +12,15 @@ # source and binary forms, with or without modification, ARE PERMITTED provided # save this copyright notice. This document/program is distributed WITHOUT any # warranty, use at YOUR own risk. -#neoboot modules +#neoboot modules #--------------------------------------------- NEOBOOT ---------------------------------------------# from __future__ import absolute_import from . import _ -from Plugins.Extensions.NeoBoot.files.stbbranding import LogCrashGS, getSupportedTuners, getLabelDisck, getINSTALLNeo, getNeoLocation, getLocationMultiboot, getNeoMount, getNeoMount2, getNeoMount3, getNeoMount4, getNeoMount5, getFSTAB, getFSTAB2, getKernelVersionString, getKernelImageVersion, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getTunerModel, getImageDistroN, getFormat, getNEO_filesystems, getBoxModelVU, getMountPointAll, getMountPointNeo -from Plugins.Extensions.NeoBoot.files import Harddisk -from Components.About import about +from Plugins.Extensions.NeoBoot.files.stbbranding import LogCrashGS, getSupportedTuners, getLabelDisck, getINSTALLNeo, getNeoLocation, getLocationMultiboot, getNeoMount, getNeoMount2, getNeoMount3, getNeoMount4, getNeoMount5, getFSTAB, getFSTAB2, getKernelVersionString, getKernelImageVersion, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getTunerModel, getImageDistroN, getFormat, getNEO_filesystems, getBoxModelVU, getMountPointAll, getMountPointNeo +from Plugins.Extensions.NeoBoot.files import Harddisk +from Components.About import about from enigma import getDesktop, eTimer -from Screens.Screen import Screen +from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Screens.ChoiceBox import ChoiceBox from Screens.VirtualKeyBoard import VirtualKeyBoard @@ -34,7 +34,7 @@ from Components.MenuList import MenuList from Components.Input import Input from Components.Label import Label from Components.ProgressBar import ProgressBar -from Components.ScrollLabel import ScrollLabel +from Components.ScrollLabel import ScrollLabel from Components.Pixmap import Pixmap, MultiPixmap from Components.config import * from Components.ConfigList import ConfigListScreen @@ -46,31 +46,31 @@ import os import time from time import gmtime, strftime from Tools.Testinout import getTestIn, getTestOut, getTestInTime, getTestOutTime, getAccessN, getAccesDate, getButtonPin, getTestToTest -if fileExists('/etc/vtiversion.info') or fileExists('/etc/bhversion') or fileExists('/usr/lib/python3.8') and fileExists('/.multinfo'): - from Screens.Console import Console +if fileExists('/etc/vtiversion.info') or fileExists('/etc/bhversion') or fileExists('/usr/lib/python3.8') and fileExists('/.multinfo'): + from Screens.Console import Console else: try: - from Plugins.Extensions.NeoBoot.files.neoconsole import Console + from Plugins.Extensions.NeoBoot.files.neoconsole import Console except: from Screens.Console import Console - + loggscrash = time.localtime(time.time()) PLUGINVERSION = '9.25' UPDATEVERSION = '9.26' -UPDATEDATE = '"+%Y05%d"' -LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' +UPDATEDATE = '"+%Y05%d"' +LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' try: from enigma import addFont font_osans = LinkNeoBoot + '/neoskins/osans.ttf' font_sagoe = LinkNeoBoot + '/neoskins/sagoe.ttf' - addFont(font_osans, 'genel', 100, True) + addFont(font_osans, 'genel', 100, True) addFont(font_sagoe, 'baslk', 100, True) addFont(font_sagoe, 'tasat', 100, True) addFont(font_sagoe, 'dugme', 90, True) except: print("ERROR INSERTING FONT") - + def neoTranslator(): neolang = '' @@ -107,13 +107,13 @@ def isUHD(): class MyUpgrade(Screen): if isFHD(): from Plugins.Extensions.NeoBoot.neoskins.default import MyUpgradeFULLHD - skin = MyUpgradeFULLHD + skin = MyUpgradeFULLHD elif isUHD(): from Plugins.Extensions.NeoBoot.neoskins.default import MyUpgradeUltraHD skin = MyUpgradeUltraHD else: from Plugins.Extensions.NeoBoot.neoskins.default import MyUpgradeHD - skin = MyUpgradeHD + skin = MyUpgradeHD __module__ = __name__ @@ -125,7 +125,7 @@ class MyUpgrade(Screen): self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'ok': self.KeyOk, 'back': self.changever}) - def changever(self): + def changever(self): ImageChoose = self.session.open(NeoBootImageChoose) if fileExists('' + LinkNeoBoot + '/.location'): out = open('%sImageBoot/.version' % getNeoLocation(), 'w') @@ -147,7 +147,7 @@ class MyUpgrade(Screen): self.list.append(res) self['list'].list = self.list - def KeyOk(self): + def KeyOk(self): self.sel = self['list'].getCurrent() if self.sel: self.sel = self.sel[2] @@ -155,10 +155,10 @@ class MyUpgrade(Screen): pass self.close() - def goKeyOk(self): - try: + def goKeyOk(self): + try: from Plugins.Extensions.NeoBoot.files.tools import UpdateNeoBoot - self.session.open(UpdateNeoBoot) + self.session.open(UpdateNeoBoot) except Exception as e: loggscrash = time.localtime(time.time()) LogCrashGS('%02d:%02d:%d %02d:%02d:%02d - %s\r\n' % (loggscrash.tm_mday, loggscrash.tm_mon, loggscrash.tm_year, loggscrash.tm_hour, loggscrash.tm_min, loggscrash.tm_sec, str(e))) @@ -168,13 +168,13 @@ class MyUpgrade(Screen): class NeoBootInstallation(Screen): if isFHD(): from Plugins.Extensions.NeoBoot.neoskins.default import NeoBootInstallationFULLHD - skin = NeoBootInstallationFULLHD + skin = NeoBootInstallationFULLHD elif isUHD(): from Plugins.Extensions.NeoBoot.neoskins.default import NeoBootInstallationUltraHD skin = NeoBootInstallationUltraHD else: from Plugins.Extensions.NeoBoot.neoskins.default import NeoBootInstallationHD - skin = NeoBootInstallationHD + skin = NeoBootInstallationHD def __init__(self, session): Screen.__init__(self, session) @@ -187,17 +187,17 @@ class NeoBootInstallation(Screen): self['label1'] = Label(_('Welcome to NeoBoot %s Plugin installation.') % PLUGINVERSION) self['label3'] = Label(_('It is recommended to give a label to the disk.')) self['label2'] = Label(_('Here is the list of mounted devices in Your STB\nPlease choose a device where You would like to install NeoBoot')) - self['actions'] = ActionMap(['WizardActions', 'ColorActions', 'DirectionActions'], {'red': self.Instrukcja, + self['actions'] = ActionMap(['WizardActions', 'ColorActions', 'DirectionActions'], {'red': self.Instrukcja, 'green': self.checkinstall, 'ok': self.checkinstall, 'key_menu': self.datadrive, - 'yellow': self.SetDiskLabel, - 'blue': self.devices, - 'back': self.close}) + 'yellow': self.SetDiskLabel, + 'blue': self.devices, + 'back': self.close}) self.updateList() - + if fileExists('/etc/fstab'): - neoformat = getFormat() + neoformat = getFormat() writefile = open('/tmp/.neo_format', 'w') writefile.write(neoformat) writefile.close() @@ -210,8 +210,8 @@ class NeoBootInstallation(Screen): loggscrash = time.localtime(time.time()) LogCrashGS('%02d:%02d:%d %02d:%02d:%02d - %s\r\n' % (loggscrash.tm_mday, loggscrash.tm_mon, loggscrash.tm_year, loggscrash.tm_hour, loggscrash.tm_min, loggscrash.tm_sec, str(e))) mess = _('Sorry cannot open menu set disk label\nAccess Fails with Error code 0x01.') - self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) - + self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) + def Instrukcja(self): try: from Plugins.Extensions.NeoBoot.files.tools import MyHelpNeo @@ -221,7 +221,7 @@ class NeoBootInstallation(Screen): LogCrashGS('%02d:%02d:%d %02d:%02d:%02d - %s\r\n' % (loggscrash.tm_mday, loggscrash.tm_mon, loggscrash.tm_year, loggscrash.tm_hour, loggscrash.tm_min, loggscrash.tm_sec, str(e))) mess = _('Sorry cannot open menu set disk label\nAccess Fails with Error code 0x01.') self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) - + def datadrive(self): try: message = "echo -e '\n" @@ -290,12 +290,12 @@ class NeoBootInstallation(Screen): mysd self.list.append(mysd) else: - mysd + mysd if mycard: mycard self.list.append(mycard) else: - mycard + mycard if myhdd: myhdd self.list.append(myhdd) @@ -308,7 +308,7 @@ class NeoBootInstallation(Screen): myssd self['config'].setList(self.list) - + def checkReadWriteDir(self, configele): supported_filesystems = frozenset(('ext4', 'ext3', 'ext2', 'nfs')) candidates = [] @@ -317,7 +317,7 @@ class NeoBootInstallation(Screen): for partition in Harddisk.harddiskmanager.getMountedPartitions(False, mounts): if partition.filesystem(mounts) in supported_filesystems: candidates.append((partition.description, partition.mountpoint)) - + if candidates: locations = [] for validdevice in candidates: @@ -362,34 +362,34 @@ class NeoBootInstallation(Screen): if fileExists('/.multinfo'): mess = _('Sorry, Neoboot can be installed or upgraded only when booted from Flash') self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) - else: + else: self.checkinstall2() - + def checkinstall2(self): - if fileExists('/media/usb/ImageBoot/') and fileExists('/media/hdd/ImageBoot/'): - mess = _('An error was encountered, you have neoboot installed on usb and hdd.\nUninstall one directories from one drive.') + if fileExists('/media/usb/ImageBoot/') and fileExists('/media/hdd/ImageBoot/'): + mess = _('An error was encountered, you have neoboot installed on usb and hdd.\nUninstall one directories from one drive.') self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) else: self.checkinstall3() def checkinstall3(self): - if checkInternet(): + if checkInternet(): self.check_LabelDisck() else: mess = _('Geen internet') - self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) + self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) def check_LabelDisck(self): - system('blkid -c /dev/null /dev/sd* > ' + LinkNeoBoot + '/bin/reading_blkid; chmod 755 ' + LinkNeoBoot + '/bin/reading_blkid ') - if getLabelDisck() != 'LABEL=': - message = _('NeoBot - First use yellow button and Set Disk Label!\nWithout labeling disc neoboot may not work properly') + system('blkid -c /dev/null /dev/sd* > ' + LinkNeoBoot + '/bin/reading_blkid; chmod 755 ' + LinkNeoBoot + '/bin/reading_blkid ') + if getLabelDisck() != 'LABEL=': + message = _('NeoBot - First use yellow button and Set Disk Label!\nWithout labeling disc neoboot may not work properly') ybox = self.session.openWithCallback(self.goSetDiskLabel, MessageBox, message, MessageBox.TYPE_YESNO) ybox.setTitle(_('Install Confirmation')) else: self.check_fstabUUID() - def check_fstabUUID(self): + def check_fstabUUID(self): if getFSTAB2() != 'OKinstall': message = (_('Disk UUID not found\n - Universally unique identifier (UUID) is not required.\nYou can proceed with further installation or give an ID to your disk.\nTo continue the installation neoboo, press OK or No to abort.')) ybox = self.session.openWithCallback(self.SetMountPointFSTAB, MessageBox, message, MessageBox.TYPE_YESNO) @@ -399,25 +399,25 @@ class NeoBootInstallation(Screen): self.first_installation() def goSetDiskLabel(self, yesno): - if yesno: + if yesno: from Plugins.Extensions.NeoBoot.files.devices import SetDiskLabel self.session.open(SetDiskLabel) else: - message = _('NeoBot - choose what you want to do, install or not !!!') + message = _('NeoBot - choose what you want to do, install or not !!!') ybox = self.session.openWithCallback(self.goInstall, MessageBox, message, MessageBox.TYPE_YESNO) ybox.setTitle(_('Install Confirmation')) def SetMountPointFSTAB(self, yesno): - if yesno: - message = _('Proceed with further installation without providing a unique identifier for the disks ?') + if yesno: + message = _('Proceed with further installation without providing a unique identifier for the disks ?') ybox = self.session.openWithCallback(self.goInstall, MessageBox, message, MessageBox.TYPE_YESNO) ybox.setTitle(_('Install Confirmation')) else: self.devices() - + def goInstall(self, yesno): if yesno: - self.first_installation() + self.first_installation() else: self.myclose2(_('NeoBoot has not been installed ! :(')) @@ -429,7 +429,7 @@ class NeoBootInstallation(Screen): if line.find(' ext') and line.find('/media/hdd') or line.find('/media/usb') == -1 and (line.find('ext4') != -1 or line.find('ext3') != -1 or line.find('ext2') != -1): check = True break - + if check == False: self.session.open(MessageBox, _('Sorry, there is not any connected devices in your STB.\nPlease connect HDD or USB to install NeoBoot!'), MessageBox.TYPE_INFO) else: @@ -441,35 +441,35 @@ class NeoBootInstallation(Screen): else: self.close() - def install2(self, yesno): + def install2(self, yesno): print("yesno:"), yesno - if yesno: + if yesno: self.first_installationNeoBoot() else: self.myclose2(_('NeoBoot has not been installed ! :(')) - def first_installationNeoBoot(self): + def first_installationNeoBoot(self): self.mysel = self['config'].getCurrent() - os.system('cd ' + LinkNeoBoot + '/; chmod 0755 ./bin/neoini*; chmod 0755 ./ex_init.py; chmod 0755 ./tmpfiles/target/*.sh; chmod 0755 ./files/userscript.sh') - cmd1 = 'mkdir ' + self.mysel + 'ImageBoot;mkdir ' + self.mysel + 'ImagesUpload' + os.system('cd ' + LinkNeoBoot + '/; chmod 0755 ./bin/neoini*; chmod 0755 ./ex_init.py; chmod 0755 ./tmpfiles/target/*.sh; chmod 0755 ./files/userscript.sh') + cmd1 = 'mkdir ' + self.mysel + 'ImageBoot;mkdir ' + self.mysel + 'ImagesUpload' system(cmd1) - cmd2 = 'mkdir ' + self.mysel + 'ImageBoot;mkdir ' + self.mysel + 'ImagesUpload/.kernel' - system(cmd2) + cmd2 = 'mkdir ' + self.mysel + 'ImageBoot;mkdir ' + self.mysel + 'ImagesUpload/.kernel' + system(cmd2) - if os.path.isfile('' + LinkNeoBoot + '/.location'): - os.system('rm -f ' + LinkNeoBoot + '/.location') + if os.path.isfile('' + LinkNeoBoot + '/.location'): + os.system('rm -f ' + LinkNeoBoot + '/.location') out = open('/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/.location', 'w') out.write(self.mysel) - out.close() - - if os.path.isfile('%sImageBoot/.neonextboot' % getNeoLocation()): - os.system('rm -f /etc/neoimage; rm -f /etc/imageboot; rm -f %sImageBoot/.neonextboot; rm -f %sImageBoot/.version; rm -f %sImageBoot/.Flash; rm -f %sImageBoot/.imagedistro; rm -f %sImageBoot/.initneo.log; rm -f %sImageBoot/.updateversion' % (getNeoLocation(), getNeoLocation(), getNeoLocation(), getNeoLocation(), getNeoLocation(), getNeoLocation())) + out.close() - if os.path.isfile('%sImageBoot/.neonextboot' % getNeoLocation()): + if os.path.isfile('%sImageBoot/.neonextboot' % getNeoLocation()): + os.system('rm -f /etc/neoimage; rm -f /etc/imageboot; rm -f %sImageBoot/.neonextboot; rm -f %sImageBoot/.version; rm -f %sImageBoot/.Flash; rm -f %sImageBoot/.imagedistro; rm -f %sImageBoot/.initneo.log; rm -f %sImageBoot/.updateversion' % (getNeoLocation(), getNeoLocation(), getNeoLocation(), getNeoLocation(), getNeoLocation(), getNeoLocation())) + + if os.path.isfile('%sImageBoot/.neonextboot' % getNeoLocation()): os.system('rm -f /etc/neoimage; rm -f /etc/imageboot; rm -f %sImageBoot/.neonextboot; rm -f %sImageBoot/.version; rm -f %sImageBoot/.Flash; ' % (getNeoLocation(), getNeoLocation(), getNeoLocation())) - if os.path.isfile('%sImagesUpload/.kernel/zImage*.ipk or %sImagesUpload/.kernel/zImage*.bin' % (getNeoLocation(), getNeoLocation())): - os.system('rm -f %sImagesUpload/.kernel/zImage*.ipk; rm -f %sImagesUpload/.kernel/zImage*.bin' % (getNeoLocation(), getNeoLocation())) + if os.path.isfile('%sImagesUpload/.kernel/zImage*.ipk or %sImagesUpload/.kernel/zImage*.bin' % (getNeoLocation(), getNeoLocation())): + os.system('rm -f %sImagesUpload/.kernel/zImage*.ipk; rm -f %sImagesUpload/.kernel/zImage*.bin' % (getNeoLocation(), getNeoLocation())) if fileExists('/etc/issue.net'): try: @@ -479,13 +479,13 @@ class NeoBootInstallation(Screen): open('%sImageBoot/.Flash' % getNeoLocation(), 'w').write(image) except: False - + if not fileExists('/usr/lib/periodon/.accessdate'): os.system('date %s > /usr/lib/periodon/.accessdate' % UPDATEDATE) out1 = open('%sImageBoot/.version' % getNeoLocation(), 'w') out1.write(PLUGINVERSION) - out1.close() + out1.close() out2 = open('%sImageBoot/.neonextboot' % getNeoLocation(), 'w') out2.write('Flash ') out2.close() @@ -494,26 +494,26 @@ class NeoBootInstallation(Screen): out3.write('Kernel-Version: ' + about.getKernelVersionString() + '\n') out3.write('NeoBoot\n') out3.write('NeoBoot-Version: ' + PLUGINVERSION + '\n') - out3.close() + out3.close() out = open('%sImageBoot/.updateversion' % getNeoLocation(), 'w') out.write(UPDATEVERSION) out.close() if fileExists('/usr/lib/enigma2/python/boxbranding.so'): from boxbranding import getImageDistro - imagedistro = getImageDistro() + imagedistro = getImageDistro() writefile = open('%sImageBoot/.imagedistro' % getNeoLocation(), 'w') writefile.write(imagedistro) writefile.close() elif fileExists('/usr/lib/enigma2/python/Plugins/PLi'): obraz = open('/etc/issue.net', 'r').readlines() imagetype = obraz[0][:-3] - image = imagetype + image = imagetype writefile = open('%sImageBoot/.imagedistro' % getNeoLocation(), 'w') writefile.write(imagetype) - writefile.close() + writefile.close() elif fileExists('/etc/vtiversion.info'): - f = open("/etc/vtiversion.info", 'r') + f = open("/etc/vtiversion.info", 'r') imagever = f.readline().strip().replace("Release ", " ") f.close() image = imagever @@ -521,7 +521,7 @@ class NeoBootInstallation(Screen): writefile.write(imagever) writefile.close() elif fileExists('/etc/bhversion'): - f = open("/etc/bhversion", 'r') + f = open("/etc/bhversion", 'r') imagever = f.readline().strip() f.close() image = imagever @@ -535,60 +535,60 @@ class NeoBootInstallation(Screen): if os.system('opkg list-installed | grep python-argparse') != 0: os.system('opkg install python-argparse') if os.system('opkg list-installed | grep curl') != 0: - os.system('opkg install curl') + os.system('opkg install curl') if getCPUtype() == 'MIPS': if os.system('opkg list-installed | grep kernel-module-nandsim') != 0: - os.system('opkg install kernel-module-nandsim') + os.system('opkg install kernel-module-nandsim') if os.system('opkg list-installed | grep mtd-utils-jffs2') != 0: os.system('opkg install mtd-utils-jffs2') - if os.system('opkg list-installed | grep lzo') != 0: - os.system('opkg install lzo') - if os.system('opkg list-installed | grep python-setuptools') != 0: - os.system('opkg install python-setuptools') - if os.system('opkg list-installed | grep util-linux-sfdisk') != 0: - os.system('opkg install util-linux-sfdisk') - if os.system('opkg list-installed | grep packagegroup-base-nfs') != 0: - os.system('opkg install packagegroup-base-nfs') - if os.system('opkg list-installed | grep ofgwrite') != 0: + if os.system('opkg list-installed | grep lzo') != 0: + os.system('opkg install lzo') + if os.system('opkg list-installed | grep python-setuptools') != 0: + os.system('opkg install python-setuptools') + if os.system('opkg list-installed | grep util-linux-sfdisk') != 0: + os.system('opkg install util-linux-sfdisk') + if os.system('opkg list-installed | grep packagegroup-base-nfs') != 0: + os.system('opkg install packagegroup-base-nfs') + if os.system('opkg list-installed | grep ofgwrite') != 0: os.system('opkg install ofgwrite') - if os.system('opkg list-installed | grep bzip2') != 0: + if os.system('opkg list-installed | grep bzip2') != 0: os.system('opkg install bzip2') if os.system('opkg list-installed | grep mtd-utils') != 0: os.system('opkg install mtd-utils') - if os.system('opkg list-installed | grep mtd-utils-ubifs') != 0: - os.system('opkg install mtd-utils-ubifs') + if os.system('opkg list-installed | grep mtd-utils-ubifs') != 0: + os.system('opkg install mtd-utils-ubifs') # STB ARM if getCPUtype() == "ARMv7": if getBoxHostName() == "vuduo4k" and getBoxHostName() != "ustym4kpro": os.system('cd ' + LinkNeoBoot + '/') - os.system('cp -Rf ' + LinkNeoBoot + '/bin/neoinitarm /sbin/neoinitarm; cp -Rf ' + LinkNeoBoot + '/bin/neoinitarmvuDuo4k /sbin/neoinitarmvu; mv ' + LinkNeoBoot + '/tmpfiles/runpy/duo4k_run.py ' + LinkNeoBoot + '/run.py; cd') - os.system('chmod 755 /sbin/neoinitarm; chmod 755 /sbin/neoinitarmvu') + os.system('cp -Rf ' + LinkNeoBoot + '/bin/neoinitarm /sbin/neoinitarm; cp -Rf ' + LinkNeoBoot + '/bin/neoinitarmvuDuo4k /sbin/neoinitarmvu; mv ' + LinkNeoBoot + '/tmpfiles/runpy/duo4k_run.py ' + LinkNeoBoot + '/run.py; cd') + os.system('chmod 755 /sbin/neoinitarm; chmod 755 /sbin/neoinitarmvu') os.system('dd if=/dev/mmcblk0p6 of=%sImagesUpload/.kernel/flash-kernel-%s.bin' % (getNeoLocation(), getBoxHostName())) - os.system('mv ' + LinkNeoBoot + '/tmpfiles/target/vuDuo4Kmmcblk0p6.sh ' + LinkNeoBoot + '/files/kernel.sh; cd') + os.system('mv ' + LinkNeoBoot + '/tmpfiles/target/vuDuo4Kmmcblk0p6.sh ' + LinkNeoBoot + '/files/kernel.sh; cd') elif getBoxHostName() == "vuduo4kse" and getBoxHostName() != "vuultimo4k" and getBoxHostName() != "ustym4kpro": os.system('cd ' + LinkNeoBoot + '/') - os.system('cp -Rf ' + LinkNeoBoot + '/bin/neoinitarm /sbin/neoinitarm; cp -Rf ' + LinkNeoBoot + '/bin/neoinitarmvuDuo4k /sbin/neoinitarmvu; mv ' + LinkNeoBoot + '/tmpfiles/runpy/duo4kse_run.py ' + LinkNeoBoot + '/run.py; cd') - os.system('chmod 755 /sbin/neoinitarm; chmod 755 /sbin/neoinitarmvu') - os.system('dd if=/dev/mmcblk0p6 of=%sImagesUpload/.kernel/flash-kernel-%s.bin' % (getNeoLocation(), getBoxHostName())) - os.system('mv ' + LinkNeoBoot + '/tmpfiles/target/vuDuo4Ksemmcblk0p6.sh ' + LinkNeoBoot + '/files/kernel.sh; cd') - - elif getBoxHostName() == "vuzero4k" and getBoxHostName() != "ustym4kpro": - os.system('cd ' + LinkNeoBoot + '/') - os.system('cp -Rf ' + LinkNeoBoot + '/bin/neoinitarm /sbin/neoinitarm; cp -Rf ' + LinkNeoBoot + '/bin/neoinitarmvu /sbin/neoinitarmvu; cd') + os.system('cp -Rf ' + LinkNeoBoot + '/bin/neoinitarm /sbin/neoinitarm; cp -Rf ' + LinkNeoBoot + '/bin/neoinitarmvuDuo4k /sbin/neoinitarmvu; mv ' + LinkNeoBoot + '/tmpfiles/runpy/duo4kse_run.py ' + LinkNeoBoot + '/run.py; cd') os.system('chmod 755 /sbin/neoinitarm; chmod 755 /sbin/neoinitarmvu') - os.system('dd if=/dev/mmcblk0p4 of=%sImagesUpload/.kernel/flash-kernel-%s.bin' % (getNeoLocation(), getBoxHostName())) - os.system('mv ' + LinkNeoBoot + '/tmpfiles/target/vuZero4Kmmcblk0p4.sh ' + LinkNeoBoot + '/files/kernel.sh; mv ' + LinkNeoBoot + '/tmpfiles/runpy/zero4k_run.py ' + LinkNeoBoot + '/run.py; rm -f ' + LinkNeoBoot + '/bin/neoinitarmvuDuo4k; cd') - + os.system('dd if=/dev/mmcblk0p6 of=%sImagesUpload/.kernel/flash-kernel-%s.bin' % (getNeoLocation(), getBoxHostName())) + os.system('mv ' + LinkNeoBoot + '/tmpfiles/target/vuDuo4Ksemmcblk0p6.sh ' + LinkNeoBoot + '/files/kernel.sh; cd') + + elif getBoxHostName() == "vuzero4k" and getBoxHostName() != "ustym4kpro": + os.system('cd ' + LinkNeoBoot + '/') + os.system('cp -Rf ' + LinkNeoBoot + '/bin/neoinitarm /sbin/neoinitarm; cp -Rf ' + LinkNeoBoot + '/bin/neoinitarmvu /sbin/neoinitarmvu; cd') + os.system('chmod 755 /sbin/neoinitarm; chmod 755 /sbin/neoinitarmvu') + os.system('dd if=/dev/mmcblk0p4 of=%sImagesUpload/.kernel/flash-kernel-%s.bin' % (getNeoLocation(), getBoxHostName())) + os.system('mv ' + LinkNeoBoot + '/tmpfiles/target/vuZero4Kmmcblk0p4.sh ' + LinkNeoBoot + '/files/kernel.sh; mv ' + LinkNeoBoot + '/tmpfiles/runpy/zero4k_run.py ' + LinkNeoBoot + '/run.py; rm -f ' + LinkNeoBoot + '/bin/neoinitarmvuDuo4k; cd') + elif getBoxHostName() == "vuultimo4k" or getBoxHostName() == "vusolo4k" or getBoxHostName() == "vuuno4k" or getBoxHostName() == "vuuno4kse" and getBoxHostName() != "ustym4kpro": os.system('cd ' + LinkNeoBoot + '/') - os.system('cp -Rf ' + LinkNeoBoot + '/bin/neoinitarm /sbin/neoinitarm; cp -Rf ' + LinkNeoBoot + '/bin/neoinitarmvu /sbin/neoinitarmvu; cd') - os.system('chmod 755 /sbin/neoinitarm; chmod 755 /sbin/neoinitarmvu') + os.system('cp -Rf ' + LinkNeoBoot + '/bin/neoinitarm /sbin/neoinitarm; cp -Rf ' + LinkNeoBoot + '/bin/neoinitarmvu /sbin/neoinitarmvu; cd') + os.system('chmod 755 /sbin/neoinitarm; chmod 755 /sbin/neoinitarmvu') os.system('dd if=/dev/mmcblk0p1 of=%sImagesUpload/.kernel/flash-kernel-%s.bin' % (getNeoLocation(), getBoxHostName())) - os.system('mv ' + LinkNeoBoot + '/tmpfiles/target/vu_mmcblk0p1.sh ' + LinkNeoBoot + '/files/kernel.sh; mv ' + LinkNeoBoot + '/tmpfiles/runpy/vu4k_run.py ' + LinkNeoBoot + '/run.py; rm -f; rm -f ' + LinkNeoBoot + '/bin/neoinitarmvuDuo4k; cd') + os.system('mv ' + LinkNeoBoot + '/tmpfiles/target/vu_mmcblk0p1.sh ' + LinkNeoBoot + '/files/kernel.sh; mv ' + LinkNeoBoot + '/tmpfiles/runpy/vu4k_run.py ' + LinkNeoBoot + '/run.py; rm -f; rm -f ' + LinkNeoBoot + '/bin/neoinitarmvuDuo4k; cd') else: os.system('cp -f ' + LinkNeoBoot + '/bin/neoinitarm /sbin/neoinitarm; chmod 0755 /sbin/neoinitarm; ln -sfn /sbin/neoinitarm /sbin/init; mv ' + LinkNeoBoot + '/tmpfiles/runpy/arm_run.py ' + LinkNeoBoot + '/run.py; rm -f ' + LinkNeoBoot + '/bin/neoinitarmvuDuo4k; cd') - # STB MIPS + # STB MIPS elif getCPUtype() == 'MIPS': #vuplus stb mtd1 if getBoxHostName() == 'bm750' or getBoxHostName() == 'vuduo' or getBoxHostName() == 'vusolo' or getBoxHostName() == 'vuuno' or getBoxHostName() == 'vuultimo': @@ -596,95 +596,95 @@ class NeoBootInstallation(Screen): os.system('cd ' + getNeoLocation() + 'ImagesUpload/.kernel/; /usr/sbin/nanddump /dev/mtd1 > vmlinux.gz; mv ./vmlinux.gz ./' + getBoxHostName() + '.vmlinux.gz') elif not fileExists('/usr/sbin/nanddump'): os.system('cd ' + getNeoLocation() + 'ImagesUpload/.kernel/; ' + LinkNeoBoot + '/bin/nanddump_mips /dev/mtd1 > vmlinux.gz; mv ./vmlinux.gz ./' + getBoxHostName() + '.vmlinux.gz') - os.system('cd ' + LinkNeoBoot + '/; rm ./bin/fontforneoboot.ttf; rm ./bin/libpngneo; mv ' + LinkNeoBoot + '/tmpfiles/target/vu_dev_mtd1.sh ' + LinkNeoBoot + '/files/kernel.sh;mv ' + LinkNeoBoot + '/tmpfiles/runpy/vu_mtd1_run.py ' + LinkNeoBoot + '/run.py; cd') + os.system('cd ' + LinkNeoBoot + '/; rm ./bin/fontforneoboot.ttf; rm ./bin/libpngneo; mv ' + LinkNeoBoot + '/tmpfiles/target/vu_dev_mtd1.sh ' + LinkNeoBoot + '/files/kernel.sh;mv ' + LinkNeoBoot + '/tmpfiles/runpy/vu_mtd1_run.py ' + LinkNeoBoot + '/run.py; cd') - #vuplus stb mtd2 + #vuplus stb mtd2 elif getBoxHostName() == 'vusolo2' or getBoxHostName() == 'vuduo2' or getBoxHostName() == 'vusolose' or getBoxHostName() == 'vuzero': if fileExists('/usr/sbin/nanddump'): os.system('cd ' + getNeoLocation() + 'ImagesUpload/.kernel/; /usr/sbin/nanddump /dev/mtd2 > vmlinux.gz; mv ./vmlinux.gz ./' + getBoxHostName() + '.vmlinux.gz') elif not fileExists('/usr/sbin/nanddump'): os.system('cd ' + getNeoLocation() + 'ImagesUpload/.kernel/; ' + LinkNeoBoot + '/bin/nanddump_mips /dev/mtd2 > vmlinux.gz; mv ./vmlinux.gz ./' + getBoxHostName() + '.vmlinux.gz') - os.system('cd ' + LinkNeoBoot + '/; rm ./bin/fontforneoboot.ttf; rm ./bin/libpngneo; mv ' + LinkNeoBoot + '/tmpfiles/target/vu_dev_mtd2.sh ' + LinkNeoBoot + '/files/kernel.sh; mv ' + LinkNeoBoot + '/tmpfiles/runpy/vu_mtd2_run.py ' + LinkNeoBoot + '/run.py; cd') + os.system('cd ' + LinkNeoBoot + '/; rm ./bin/fontforneoboot.ttf; rm ./bin/libpngneo; mv ' + LinkNeoBoot + '/tmpfiles/target/vu_dev_mtd2.sh ' + LinkNeoBoot + '/files/kernel.sh; mv ' + LinkNeoBoot + '/tmpfiles/runpy/vu_mtd2_run.py ' + LinkNeoBoot + '/run.py; cd') - #Other stb MIPS - else: + #Other stb MIPS + else: os.system('cd ' + LinkNeoBoot + '/; chmod 755 ./bin/nandwrite; mv ./bin/fontforneoboot.ttf /usr/share/fonts; mv ./bin/libpngneo /usr/lib; cp -f ./bin/neoinitmips /sbin/neoinitmips; cp -f ./bin/neoinitmipsvu /sbin/neoinitmipsvu; chmod 0755 /sbin/neoinit*; rm -f ./bin/neobm; mv ./bin/neobmmips ./bin/neobm; chmod 0755 ./bin/neobm; chmod 0755 /usr/lib/libpngneo; cd; chmod 0755 /sbin/neoinitmips; ln -sf /media/neoboot/ImageBoot/.neonextboot /etc/neoimage; mv ' + LinkNeoBoot + '/tmpfiles/runpy/mips_run.py ' + LinkNeoBoot + '/run.py; cd') - - os.system('cp -Rf ' + LinkNeoBoot + '/bin/neoinitmips /sbin/neoinitmips; cp -Rf ' + LinkNeoBoot + '/bin/neoinitmipsvu /sbin/neoinitmipsvu; chmod 755 /sbin/neoinit*') + + os.system('cp -Rf ' + LinkNeoBoot + '/bin/neoinitmips /sbin/neoinitmips; cp -Rf ' + LinkNeoBoot + '/bin/neoinitmipsvu /sbin/neoinitmipsvu; chmod 755 /sbin/neoinit*') os.system('chmod 755 ' + LinkNeoBoot + '/bin/nfidump; chmod 0755 ' + LinkNeoBoot + '/bin/nanddump_mips; rm -r ' + LinkNeoBoot + '/bin/neoinitar*; cd /') if fileExists('' + LinkNeoBoot + '/bin/fontforneoboot.ttf'): ('cd ' + LinkNeoBoot + '/;mv ./bin/fontforneoboot.ttf /usr/share/fonts; cd /') if fileExists('' + LinkNeoBoot + '/bin/libpngneo'): - ('cd ' + LinkNeoBoot + '/;mv ./bin/libpngneo /usr/lib; chmod 0755 /usr/lib/libpngneo; cd /') + ('cd ' + LinkNeoBoot + '/;mv ./bin/libpngneo /usr/lib; chmod 0755 /usr/lib/libpngneo; cd /') if fileExists('' + LinkNeoBoot + '/bin/neobm'): ('cd ' + LinkNeoBoot + '/;chmod 0755 ./bin/neobm; cd /') else: self.messagebox = self.session.open(MessageBox, _('The tuner is not supported by NeoBoot.\nContact the author.\nNo proper STB for installation !!!!'), type=MessageBox.TYPE_ERROR) - + if fileExists('/home/root/vmlinux.gz'): - os.system('mv -f /home/root/vmlinux.gz %sImagesUpload/.kernel/%s.vmlinux.gz' % (getNeoLocation(), getBoxHostName())) - - if fileExists('' + LinkNeoBoot + '/ubi_reader_mips') or fileExists('' + LinkNeoBoot + '/ubi_reader_arm') and fileExists('' + LinkNeoBoot + '/ubi_reader'): - os.system('rm -r ' + LinkNeoBoot + '/ubi_reader ') - - if getCPUtype() == 'ARMv7': - os.system('cd ' + LinkNeoBoot + '/;chmod 755 ./files/findsk.sh; mv ./bin/fbcleararm ./bin/fbclear; chmod 755 ./bin/fbclear; rm -f ./bin/nandwrite; rm -f ./bin/fbclearmips; mv ./ubi_reader_arm ./ubi_reader; rm -r ./ubi_reader_mips; rm ./bin/neoinitmips; rm ./bin/neoinitmipsvu; rm -r ./bin/nanddump_mips; rm ./bin/nfidump; rm ./bin/neobmmips; rm ./bin/neobm; mv ./bin/neobmarm ./bin/neobm; rm ./bin/fontforneoboot.ttf; rm ./bin/libpngneo; cd') - elif getCPUtype() == 'MIPS': + os.system('mv -f /home/root/vmlinux.gz %sImagesUpload/.kernel/%s.vmlinux.gz' % (getNeoLocation(), getBoxHostName())) + + if fileExists('' + LinkNeoBoot + '/ubi_reader_mips') or fileExists('' + LinkNeoBoot + '/ubi_reader_arm') and fileExists('' + LinkNeoBoot + '/ubi_reader'): + os.system('rm -r ' + LinkNeoBoot + '/ubi_reader ') + + if getCPUtype() == 'ARMv7': + os.system('cd ' + LinkNeoBoot + '/;chmod 755 ./files/findsk.sh; mv ./bin/fbcleararm ./bin/fbclear; chmod 755 ./bin/fbclear; rm -f ./bin/nandwrite; rm -f ./bin/fbclearmips; mv ./ubi_reader_arm ./ubi_reader; rm -r ./ubi_reader_mips; rm ./bin/neoinitmips; rm ./bin/neoinitmipsvu; rm -r ./bin/nanddump_mips; rm ./bin/nfidump; rm ./bin/neobmmips; rm ./bin/neobm; mv ./bin/neobmarm ./bin/neobm; rm ./bin/fontforneoboot.ttf; rm ./bin/libpngneo; cd') + elif getCPUtype() == 'MIPS': os.system('cd ' + LinkNeoBoot + '/;rm -f ./files/findsk.sh; mv ./bin/fbclearmips ./bin/fbclear; chmod 755 ./bin/fbclear; rm -f ./bin/fbcleararm; mv ./ubi_reader_mips ./ubi_reader; rm -r ./ubi_reader_arm; rm -f /bin/neoinitarm; rm -f /bin/neoinitarmvu; rm -r ./bin/nanddump_arm; rm -f /bin/neoinitarmvuDuo4k; rm -f ./bin/neobmarm') - + os.system(' ln -sfn ' + getNeoLocation() + 'ImageBoot/.neonextboot /etc/neoimage; chmod 644 ' + getNeoLocation() + 'ImagesUpload/.kernel/*; ln -sfn ' + getNeoLocation() + 'ImageBoot /etc/imageboot; rm -r ' + LinkNeoBoot + '/tmpfiles; chmod 0755 ' + LinkNeoBoot + '/files/kernel.sh') - - if os.path.isfile('' + LinkNeoBoot + '/.location'): - if getLabelDisck() != 'LABEL=': + + if os.path.isfile('' + LinkNeoBoot + '/.location'): + if getLabelDisck() != 'LABEL=': cmd = "echo -e '\n%s '" % _('NeoBoot has been installed succesfully!\nNeoBoot has detected that the disks do not have a label.\nFor correct neo boot operation, please give the disks the name LABEL\nRecommended total restart of the tuner.\n') - elif getLabelDisck() == 'LABEL=': - cmd = "echo -e '\n%s '" % _('Installed succesfully NEOBOOT!\nNeoBoot has detected that the disks have been marked.\nRecommended total restart of the tuner\n') - else: + elif getLabelDisck() == 'LABEL=': + cmd = "echo -e '\n%s '" % _('Installed succesfully NEOBOOT!\nNeoBoot has detected that the disks have been marked.\nRecommended total restart of the tuner\n') + else: self.myclose2(_('NeoBoot has not been installed ! :(')) if os.path.isfile('/etc/name'): - self.myclose2(_('The plug-in has been successfully installed.')) + self.myclose2(_('The plug-in has been successfully installed.')) else: if not fileExists('/etc/name'): - os.system('touch /etc/name') - closereboot = self.rebootSTBE2() - self.session.open(Console, _('NeoBoot Install....'), [cmd]) - self.close(closereboot) + os.system('touch /etc/name') + closereboot = self.rebootSTBE2() + self.session.open(Console, _('NeoBoot Install....'), [cmd]) + self.close(closereboot) def myclose2(self, message): self.session.open(MessageBox, message, MessageBox.TYPE_INFO) - - def rebootSTBE2(self): + + def rebootSTBE2(self): restartbox = self.session.openWithCallback(self.RebootSTB, MessageBox, _('Reboot stb now ?'), MessageBox.TYPE_YESNO) restartbox.setTitle(_('Reboot')) def RebootSTB(self, answer): if answer is True: os.system('sync && echo 3 > /proc/sys/vm/drop_caches; reboot -d -f') - else: - self.close() + else: + self.close() class NeoBootImageChoose(Screen): - if isFHD(): + if isFHD(): try: from Plugins.Extensions.NeoBoot.usedskin import ImageChooseFULLHD - skin = ImageChooseFULLHD + skin = ImageChooseFULLHD except: from Plugins.Extensions.NeoBoot.neoskins.default import ImageChooseFULLHD skin = ImageChooseFULLHD elif isUHD(): from Plugins.Extensions.NeoBoot.neoskins.default import ImageChooseULTRAHD - skin = ImageChooseULTRAHD + skin = ImageChooseULTRAHD else: try: from Plugins.Extensions.NeoBoot.usedskin import ImageChooseHD - skin = ImageChooseHD + skin = ImageChooseHD except: from Plugins.Extensions.NeoBoot.neoskins.default import ImageChooseHD - skin = ImageChooseHD + skin = ImageChooseHD - def __init__(self, session): + def __init__(self, session): Screen.__init__(self, session) self.list = [] @@ -700,7 +700,7 @@ class NeoBootImageChoose(Screen): self['key_menu'] = Label(_('More options')) self['key_1'] = Label(_('Update NeoBot')) self['key_2'] = Label(_('Reinstall NeoBoot')) - self['key_3'] = Label(_('Reinstall kernel')) + self['key_3'] = Label(_('Reinstall kernel')) self['label1'] = Label(_('Please choose an image to boot')) self['label2'] = Label(_('NeoBoot is running from:')) self['label3'] = Label('') @@ -708,62 +708,62 @@ class NeoBootImageChoose(Screen): self['label5'] = Label('') self['label6'] = Label('') self['label7'] = Label('') - self['label8'] = Label(_('Number of images installed:')) + self['label8'] = Label(_('Number of images installed:')) self['label9'] = Label('') self['label10'] = Label('') self['label11'] = Label('') self['label12'] = Label('') self['label13'] = Label(_('Version update: ')) self['label14'] = Label(_('NeoBoot version: ')) - self['label15'] = Label(_('Memory disc:')) - self['label16'] = Label(_('Kernel')) - self['label17'] = Label('') - self['label18'] = Label('') - self['label19'] = Label('') - self['label20'] = Label('') - self['label21'] = Label('NEO VIP') + self['label15'] = Label(_('Memory disc:')) + self['label16'] = Label(_('Kernel')) + self['label17'] = Label('') + self['label18'] = Label('') + self['label19'] = Label('') + self['label20'] = Label('') + self['label21'] = Label('NEO VIP') self['actions'] = ActionMap(['WizardActions', 'ColorActions', 'MenuActions', 'NumberActionMap', 'SetupActions', 'number'], {'ok': self.bootIMG, - 'red': self.DownloadImageOnline, + 'red': self.DownloadImageOnline, 'green': self.ImageInstall, 'yellow': self.removeIMG, 'blue': self.pomoc, - 'menu': self.mytools, + 'menu': self.mytools, '1': self.neoboot_update, '2': self.ReinstallNeoBoot, - '3': self.ReinstallKernel, - '4': self.touch4, #hidden option + '3': self.ReinstallKernel, + '4': self.touch4, #hidden option '5': self.touch5, #hidden option - '6': self.touch6, #hidden option + '6': self.touch6, #hidden option '7': self.touch7, #hidden option '8': self.touch8, #hidden option - '9': self.touch9, #hidden option - '0': self.touch0, #hidden option + '9': self.touch9, #hidden option + '0': self.touch0, #hidden option 'back': self.close_exit}) - self.availablespace = 0 + self.availablespace = 0 self.onShow.append(self.updateList) if not fileExists('' + LinkNeoBoot + '/files/mountpoint.sh'): getMountPointAll() - + if not fileExists('' + LinkNeoBoot + '/files/neo.sh'): getMountPointNeo() - + if fileExists('/tmp/.init_reboot'): system('rm /tmp/.init_reboot') if fileExists('/.multinfo'): if not fileExists('/.control_ok'): - if fileExists('/.control_boot_new_image'): - os.system('rm -f /.control_boot_new_image; echo "Image uruchomione OK\nNie kasuj tego pliku. \n\nImage started OK\nDo not delete this file." > /.control_ok ') - if not fileExists('/.control_boot_new_image'): - os.system('echo "Image uruchomione OK\nNie kasuj tego pliku. \n\nImage started OK\nDo not delete this file." > /.control_ok') + if fileExists('/.control_boot_new_image'): + os.system('rm -f /.control_boot_new_image; echo "Image uruchomione OK\nNie kasuj tego pliku. \n\nImage started OK\nDo not delete this file." > /.control_ok ') + if not fileExists('/.control_boot_new_image'): + os.system('echo "Image uruchomione OK\nNie kasuj tego pliku. \n\nImage started OK\nDo not delete this file." > /.control_ok') - def DownloadImageOnline(self): + def DownloadImageOnline(self): if not os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/ImageDownloader/download.py'): message = _('Plugin ImageDownloader not installed!\nInstall plugin to download new image? \and---Continue ?---') ybox = self.session.openWithCallback(self.InstallImageDownloader, MessageBox, message, MessageBox.TYPE_YESNO) @@ -778,41 +778,41 @@ class NeoBootImageChoose(Screen): mess = _('Sorry cannot open Image Downloader.\nAccess Fails with Error code 0x05.') self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) - def InstallImageDownloader(self, yesno): + def InstallImageDownloader(self, yesno): if yesno: - if checkInternet(): + if checkInternet(): cmd = 'mkdir /tmp/install; touch /tmp/install/plugin.txt; rm -rf /tmp/*.ipk' system(cmd) - if fileExists('/usr/bin/curl'): + if fileExists('/usr/bin/curl'): os.system('cd /tmp; curl -O --ftp-ssl http://read.cba.pl/panel_extra/enigma2-plugin-extensions-imagedownloader_2.6_all.ipk') - if not fileExists('/tmp/enigma2-plugin-extensions-imagedownloader_2.6_all.ipk'): + if not fileExists('/tmp/enigma2-plugin-extensions-imagedownloader_2.6_all.ipk'): if fileExists('/usr/bin/fullwget'): cmd1 = 'cd /tmp; fullwget --no-check-certificate http://read.cba.pl/panel_extra/enigma2-plugin-extensions-imagedownloader_2.6_all.ipk' system(cmd1) - if not fileExists('/tmp/enigma2-plugin-extensions-imagedownloader_2.6_all.ipk'): - if fileExists('/usr/bin/wget'): + if not fileExists('/tmp/enigma2-plugin-extensions-imagedownloader_2.6_all.ipk'): + if fileExists('/usr/bin/wget'): os.system('cd /tmp; wget --no-check-certificate http://read.cba.pl/panel_extra/enigma2-plugin-extensions-imagedownloader_2.6_all.ipk') - if fileExists('/tmp/enigma2-plugin-extensions-imagedownloader_2.6_all.ipk'): + if fileExists('/tmp/enigma2-plugin-extensions-imagedownloader_2.6_all.ipk'): cmd2 = 'opkg install --force-overwrite --force-reinstall --force-downgrade /tmp/enigma2-plugin-extensions-imagedownloader_2.6_all.ipk' system(cmd2) self.session.open(MessageBox, _('The plug-in has been successfully installed.'), MessageBox.TYPE_INFO, 5) self.close() else: self.session.open(MessageBox, _('The plugin not installed.\nAccess Fails with Error code 0x04.'), MessageBox.TYPE_INFO, 10) - self.close() + self.close() else: mess = _('Geen internet') self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) else: mess = _('Upload image files in zip formats to the ImagesUpload location.') - self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) + self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) - def chackkernel(self): + def chackkernel(self): message = _('NeoBoot detected a kernel mismatch in flash, \nInstall a kernel for flash image??') ybox = self.session.openWithCallback(self.updatekernel, MessageBox, message, MessageBox.TYPE_YESNO) ybox.setTitle(_('Updating ... ')) - def pomoc(self): + def pomoc(self): try: from Plugins.Extensions.NeoBoot.files.tools import Opis self.session.open(Opis) @@ -820,18 +820,18 @@ class NeoBootImageChoose(Screen): loggscrash = time.localtime(time.time()) LogCrashGS('%02d:%02d:%d %02d:%02d:%02d - %s\r\n' % (loggscrash.tm_mday, loggscrash.tm_mon, loggscrash.tm_year, loggscrash.tm_hour, loggscrash.tm_min, loggscrash.tm_sec, str(e))) mess = _('Sorry cannot open neo menu.\nAccess Fails with Error code 0x02.') - self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) + self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) - def ReinstallNeoBoot(self): + def ReinstallNeoBoot(self): INSTALLbox = self.session.openWithCallback(self.reinstallboot, MessageBox, _('Select Yes to reinstall the neoboot.\n NEOBOOT.'), MessageBox.TYPE_YESNO) INSTALLbox.setTitle(_('Reinstall neoboot')) - - def reinstallboot(self, answer): + + def reinstallboot(self, answer): if answer is True: try: cmd = "echo -e '\n\n%s '" % _('NEOBOOT - Please reinstall NeoBoot....\nPlease wait, done...\nrestart systemu...') - cmd1 = 'cd ' + LinkNeoBoot + '/; rm ./bin/install; rm ./.location; rm ./files/mountpoint.sh; rm ./files/neo.sh; sleep 5; PATH=/sbin:/bin:/usr/sbin:/usr/bin; echo -n "Restarting E2... "; init 4; sleep 1; init 3 ' - except: + cmd1 = 'cd ' + LinkNeoBoot + '/; rm ./bin/install; rm ./.location; rm ./files/mountpoint.sh; rm ./files/neo.sh; sleep 5; PATH=/sbin:/bin:/usr/sbin:/usr/bin; echo -n "Restarting E2... "; init 4; sleep 1; init 3 ' + except: False self.session.open(Console, _('NeoBoot ARM....'), [cmd, cmd1]) self.close() @@ -841,34 +841,34 @@ class NeoBootImageChoose(Screen): self.close() except: False - - def close_exit(self): + + def close_exit(self): system('touch /tmp/.init_reboot') - if fileExists('/tmp/error_neo'): + if fileExists('/tmp/error_neo'): try: cmd = 'cat /tmp/error_neo' cmd1 = '' self.session.openWithCallback(self.close, Console, _('NeoBoot....'), [cmd, - cmd1]) + cmd1]) self.close() except: False if not fileExists('/tmp/.finishdate') or not fileExists('/tmp/.nkod') or fileExists('/.multinfo'): - if checkInternet(): + if checkInternet(): pass else: mess = _('Geen internet') self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) - - if not fileExists('/.multinfo'): + + if not fileExists('/.multinfo'): out = open('%sImageBoot/.neonextboot' % getNeoLocation(), 'w') out.write('Flash') out.close() self.close() - - elif fileExists('/.multinfo'): + + elif fileExists('/.multinfo'): with open('/.multinfo', 'r') as f: imagefile = f.readline().strip() f.close() @@ -881,8 +881,8 @@ class NeoBootImageChoose(Screen): out.write('Flash') out.close() self.close() - - def ReinstallKernel(self): + + def ReinstallKernel(self): try: from Plugins.Extensions.NeoBoot.files.tools import ReinstallKernel self.session.open(ReinstallKernel) @@ -890,9 +890,9 @@ class NeoBootImageChoose(Screen): loggscrash = time.localtime(time.time()) LogCrashGS('%02d:%02d:%d %02d:%02d:%02d - %s\r\n' % (loggscrash.tm_mday, loggscrash.tm_mon, loggscrash.tm_year, loggscrash.tm_hour, loggscrash.tm_min, loggscrash.tm_sec, str(e))) mess = _('Sorry cannot open neo menu Reinstall Kernel.\nAccess Fails with Error code 0x03.') - self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) - - def touch5(self): + self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) + + def touch5(self): if fileExists('/usr/lib/periodon/.kodn'): if getTestIn() == getTestOut(): pass @@ -905,7 +905,7 @@ class NeoBootImageChoose(Screen): if fileExists('/usr/lib/periodon/.kodn'): pass else: - if not fileExists('/tmp/guto'): + if not fileExists('/tmp/guto'): pass else: system('touch /tmp/gutos') @@ -914,7 +914,7 @@ class NeoBootImageChoose(Screen): if fileExists('/usr/lib/periodon/.kodn'): pass else: - if not fileExists('/tmp/gutos'): + if not fileExists('/tmp/gutos'): pass else: system('touch /tmp/gutosi') @@ -924,20 +924,20 @@ class NeoBootImageChoose(Screen): pass else: if not fileExists('/tmp/gutosi'): - pass + pass else: if not fileExists('/usr/lib/periodon'): system('mkdir /usr/lib/periodon') else: if getButtonPin() == 'pinok': - os.system('sleep 2; rm -f /tmp/gut*; date %s > /usr/lib/periodon/.accessdate' % UPDATEDATE) - if fileExists('/usr/lib/periodon/.accessdate') and fileExists('/usr/lib/periodon/.kodn'): + os.system('sleep 2; rm -f /tmp/gut*; date %s > /usr/lib/periodon/.accessdate' % UPDATEDATE) + if fileExists('/usr/lib/periodon/.accessdate') and fileExists('/usr/lib/periodon/.kodn'): mess = _('Bravo! Neoboot vip full version activated OK!\nPlease restart your system E2.') self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) elif not fileExists('/usr/lib/periodon/.accessdate'): mess = _('VIP Access Activation Fails with Error code 0x10.') - self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) - elif not fileExists('/usr/lib/periodon/.kodn'): + self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) + elif not fileExists('/usr/lib/periodon/.kodn'): mess = _('VIP Access Activation Fails with Error code 0x20.') self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) @@ -945,7 +945,7 @@ class NeoBootImageChoose(Screen): if fileExists('/usr/lib/periodon/.kodn'): system('touch /tmp/gut1') else: - if not fileExists('/tmp/gutosie'): + if not fileExists('/tmp/gutosie'): pass else: system('touch /tmp/gutosiep') @@ -954,12 +954,12 @@ class NeoBootImageChoose(Screen): if fileExists('/usr/lib/periodon/.kodn'): system('touch /tmp/gut2') else: - if not fileExists('/tmp/gutosiep'): + if not fileExists('/tmp/gutosiep'): pass else: system('touch /tmp/gutosiepi') - def touch0(self): + def touch0(self): if fileExists('/usr/lib/periodon/.kodn'): if not fileExists('/tmp/gut3'): system('touch /tmp/gut3') @@ -970,21 +970,21 @@ class NeoBootImageChoose(Screen): else: pass else: - if not fileExists('/tmp/gutosiepi'): + if not fileExists('/tmp/gutosiepi'): pass else: system('touch /tmp/gutosiepin') -# def neoboot_update(self): +# def neoboot_update(self): # mess = _('Updated unnecessary, you have the latest version. Please try again later.') # self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) - #Zablokowanie aktualizacji przez zmiane nazwy neoboot_update na neoboot_update2 i likwidacja 3 lini hastagu wyzej + #Zablokowanie aktualizacji przez zmiane nazwy neoboot_update na neoboot_update2 i likwidacja 3 lini hastagu wyzej def neoboot_update(self): - if checkInternet(): - #if getTestInTime() == getTestOutTime() or getTestIn() != getTestOut(): + if checkInternet(): + #if getTestInTime() == getTestOutTime() or getTestIn() != getTestOut(): #myerror = _('Sorry, this is not neoboot vip version.\nGet NEO-VIP version, more info press blue button.') #self.session.open(MessageBox, myerror, MessageBox.TYPE_INFO) #else: @@ -1006,21 +1006,21 @@ class NeoBootImageChoose(Screen): mess = _('Geen internet') self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) - def chackupdate2(self, yesno): + def chackupdate2(self, yesno): if yesno: self.chackupdate3() else: self.session.open(MessageBox, _('Canceled update.'), MessageBox.TYPE_INFO, 7) - - def chackupdate3(self): - if fileExists('/usr/bin/fullwget'): - os.system('cd ' + LinkNeoBoot + ';fullwget --no-check-certificate https://raw.githubusercontent.com/gutosie/neoboot/master/ver.txt; sleep 3;cd /') + + def chackupdate3(self): + if fileExists('/usr/bin/fullwget'): + os.system('cd ' + LinkNeoBoot + ';fullwget --no-check-certificate https://raw.githubusercontent.com/gutosie/neoboot/master/ver.txt; sleep 3;cd /') if not fileExists('' + LinkNeoBoot + '/ver.txt'): - if fileExists('/usr/bin/curl'): + if fileExists('/usr/bin/curl'): os.system('cd ' + LinkNeoBoot + ';curl -O --ftp-ssl https://raw.githubusercontent.com/gutosie/neoboot/master/ver.txt;sleep 3;cd /') if not fileExists('' + LinkNeoBoot + '/ver.txt'): - if fileExists('/usr/bin/wget'): - os.system('cd ' + LinkNeoBoot + ';wget --no-check-certificate https://raw.githubusercontent.com/gutosie/neoboot/master/ver.txt; sleep 3;cd /') + if fileExists('/usr/bin/wget'): + os.system('cd ' + LinkNeoBoot + ';wget --no-check-certificate https://raw.githubusercontent.com/gutosie/neoboot/master/ver.txt; sleep 3;cd /') if fileExists('' + LinkNeoBoot + '/ver.txt'): mypath = '' version = open('' + LinkNeoBoot + '/ver.txt', 'r') @@ -1031,9 +1031,9 @@ class NeoBootImageChoose(Screen): ybox = self.session.openWithCallback(self.aktualizacjamboot, MessageBox, message, MessageBox.TYPE_YESNO) ybox.setTitle(_('Updating ... ')) elif fileExists('' + LinkNeoBoot + '/ver.txt'): - os.system('rm ' + LinkNeoBoot + '/ver.txt') + os.system('rm ' + LinkNeoBoot + '/ver.txt') if fileExists('' + LinkNeoBoot + '/wget-log'): - os.system('rm ' + LinkNeoBoot + '/wget-log') + os.system('rm ' + LinkNeoBoot + '/wget-log') self.session.open(MessageBox, _('Updated unnecessary, you have the latest version. Please try again later.'), MessageBox.TYPE_INFO) else: self.session.open(MessageBox, _('Unfortunately, at the moment not found an update, try again later.'), MessageBox.TYPE_INFO, 10) @@ -1041,7 +1041,7 @@ class NeoBootImageChoose(Screen): if not fileExists('' + LinkNeoBoot + '/ver.txt'): self.session.open(MessageBox, _('Unfortunately, at the moment not found an update, try again later.'), MessageBox.TYPE_INFO, 10) - def aktualizacjamboot(self, yesno): + def aktualizacjamboot(self, yesno): if yesno: if fileExists('/tmp/*.zip'): os.system('rm /tmp/*.zip') @@ -1049,14 +1049,14 @@ class NeoBootImageChoose(Screen): os.system('cd /tmp; curl -O --ftp-ssl https://github.com/gutosie/neoboot/archive/main.zip; unzip -qn ./main.zip; sleep 2;cd /') if not fileExists('/tmp/neoboot-main/NeoBoot'): if fileExists('/tmp/main.zip'): - os.system('rm -r /tmp/main.zip') - if fileExists('/usr/bin/fullwget'): - os.system('cd /tmp; fullwget --no-check-certificate https://github.com/gutosie/neoboot/archive/main.zip; unzip -qn ./main.zip; sleep 2;cd /') + os.system('rm -r /tmp/main.zip') + if fileExists('/usr/bin/fullwget'): + os.system('cd /tmp; fullwget --no-check-certificate https://github.com/gutosie/neoboot/archive/main.zip; unzip -qn ./main.zip; sleep 2;cd /') if not fileExists('/tmp/neoboot-main/NeoBoot'): if fileExists('/tmp/main.zip'): - os.system('rm -r /tmp/main.zip') - if fileExists('/usr/bin/wget'): - os.system('cd /tmp; rm ./*.zip; wget --no-check-certificate https://github.com/gutosie/neoboot/archive/main.zip; unzip -qn ./main.zip; sleep 2;cd / ') + os.system('rm -r /tmp/main.zip') + if fileExists('/usr/bin/wget'): + os.system('cd /tmp; rm ./*.zip; wget --no-check-certificate https://github.com/gutosie/neoboot/archive/main.zip; unzip -qn ./main.zip; sleep 2;cd / ') if not fileExists('/tmp/neoboot-main/NeoBoot'): self.session.open(MessageBox, _('Unfortunately, at the moment not found an update, try again later.'), MessageBox.TYPE_INFO, 10) else: @@ -1065,24 +1065,24 @@ class NeoBootImageChoose(Screen): os.system('rm -f ' + LinkNeoBoot + '/ver.txt') self.session.open(MessageBox, _('The update has been canceled.'), MessageBox.TYPE_INFO, 8) - def goUpdateNEO(self): + def goUpdateNEO(self): if fileExists('' + LinkNeoBoot + '/wget-log'): - os.system('rm ' + LinkNeoBoot + '/wget-log') - os.system('cd /tmp/; cp -rf ./neoboot-main/NeoBoot /usr/lib/enigma2/python/Plugins/Extensions; rm -rf /tmp/neoboot*; rm ' + LinkNeoBoot + '/ver.txt; cd ' + LinkNeoBoot + '/; chmod 0755 ./bin/neoini*; chmod 0755 ./ex_init.py; chmod 0755 ./tmpfiles/target/*; chmod 0755 ./files/userscript.sh; cd /; date %s > /usr/lib/periodon/.accessdate' % UPDATEDATE) + os.system('rm ' + LinkNeoBoot + '/wget-log') + os.system('cd /tmp/; cp -rf ./neoboot-main/NeoBoot /usr/lib/enigma2/python/Plugins/Extensions; rm -rf /tmp/neoboot*; rm ' + LinkNeoBoot + '/ver.txt; cd ' + LinkNeoBoot + '/; chmod 0755 ./bin/neoini*; chmod 0755 ./ex_init.py; chmod 0755 ./tmpfiles/target/*; chmod 0755 ./files/userscript.sh; cd /; date %s > /usr/lib/periodon/.accessdate' % UPDATEDATE) if getCPUtype() == 'MIPS': - os.system('cd ' + LinkNeoBoot + '/; cp -rf ./bin/neoinitmipsvu /sbin; chmod 755 /sbin/neoinitmipsvu; cp -rf ./bin/neoinitmips /sbin; chmod 755 /sbin/neoinitmips; cd') + os.system('cd ' + LinkNeoBoot + '/; cp -rf ./bin/neoinitmipsvu /sbin; chmod 755 /sbin/neoinitmipsvu; cp -rf ./bin/neoinitmips /sbin; chmod 755 /sbin/neoinitmips; cd') os.system('cd ' + LinkNeoBoot + '/; rm ./bin/install; rm -f ./files/testinout; rm ./files/mountpoint.sh; rm ./files/neo.sh; rm -f /usr/lib/periodon/.kodn; rm -f /tmp/.nkod; rm -rf /tmp/main.zip') restartbox = self.session.openWithCallback(self.restartGUI, MessageBox, _('Completed update NeoBoot.\nYou need to restart the E2 and re-enter your pin code VIP!!!\nRestart now ?'), MessageBox.TYPE_YESNO) restartbox.setTitle(_('Restart GUI now ?')) - def restartGUI(self, answer): - if answer is True: - os.system('rm -f ' + LinkNeoBoot + '/.location; rm -r ' + LinkNeoBoot + '/ubi_reader') + def restartGUI(self, answer): + if answer is True: + os.system('rm -f ' + LinkNeoBoot + '/.location; rm -r ' + LinkNeoBoot + '/ubi_reader') self.session.open(TryQuitMainloop, 3) else: self.close() - def MBBackup(self): + def MBBackup(self): try: from Plugins.Extensions.NeoBoot.files.tools import MBBackup self.session.open(MBBackup) @@ -1090,9 +1090,9 @@ class NeoBootImageChoose(Screen): loggscrash = time.localtime(time.time()) LogCrashGS('%02d:%02d:%d %02d:%02d:%02d - %s\r\n' % (loggscrash.tm_mday, loggscrash.tm_mon, loggscrash.tm_year, loggscrash.tm_hour, loggscrash.tm_min, loggscrash.tm_sec, str(e))) mess = _('Sorry cannot open neo menu Backup.\nAccess Fails with Error code 0x60.') - self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) + self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) - def MBRestore(self): + def MBRestore(self): try: from Plugins.Extensions.NeoBoot.files.tools import MBRestore self.session.open(MBRestore) @@ -1100,9 +1100,9 @@ class NeoBootImageChoose(Screen): loggscrash = time.localtime(time.time()) LogCrashGS('%02d:%02d:%d %02d:%02d:%02d - %s\r\n' % (loggscrash.tm_mday, loggscrash.tm_mon, loggscrash.tm_year, loggscrash.tm_hour, loggscrash.tm_min, loggscrash.tm_sec, str(e))) mess = _('Sorry cannot open neo menu Restore.\nAccess Fails with Error code 0x61.') - self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) - - def updateList(self): + self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) + + def updateList(self): self.list = [] pluginpath = '' + LinkNeoBoot + '' f = open(pluginpath + '/.location', 'r') @@ -1119,10 +1119,10 @@ class NeoBootImageChoose(Screen): icon = 'dev_cf.png' elif 'ssd' in mypath: icon = 'dev_ssd.png' - + icon = pluginpath + '/images/' + icon png = LoadPixmap(icon) - self['device_icon'].instance.setPixmap(png) + self['device_icon'].instance.setPixmap(png) linesdevice = open('' + LinkNeoBoot + '/.location', 'r').readlines() deviceneo = linesdevice[0][0:-1] device = deviceneo @@ -1135,7 +1135,7 @@ class NeoBootImageChoose(Screen): line = line.replace('part1', ' ') parts = line.strip().split() totsp = len(parts) - 1 - if parts[totsp] == device: + if parts[totsp] == device: if totsp == 5: ustot = parts[1] usfree = parts[3] @@ -1150,7 +1150,7 @@ class NeoBootImageChoose(Screen): os.remove('/tmp/memoryinfo.tmp') perc = int(usperc[0:-1]) -# perc = int() # jak czasami robi error to odhaszowac i zahaszowac wyzej +# perc = int() # jak czasami robi error to odhaszowac i zahaszowac wyzej self['progreso'].setValue(perc) green = '#00389416' red = '#00ff2525' @@ -1173,14 +1173,14 @@ class NeoBootImageChoose(Screen): pass self.availablespace = usfree[0:-3] - + strview = _('Used: ') + usperc + _(' \n Available: ') + usfree[0:-3] + ' MB' self['label3'].setText(strview) strview2 = _('Free Space : ') + usfree[0:-3] + ' MB' self['label11'].setText(strview2) - strview1 = _('Capacity : ') + usperc + _(' Full') + strview1 = _('Capacity : ') + usperc + _(' Full') self['label18'].setText(strview1) try: @@ -1224,27 +1224,27 @@ class NeoBootImageChoose(Screen): self['label7'].setText(str(len(self.list) - 1)) self['config'].setList(self.list) - strview = PLUGINVERSION + strview = PLUGINVERSION self['label9'].setText(strview) KERNELVERSION = getKernelImageVersion() - strview = KERNELVERSION + strview = KERNELVERSION self['label20'].setText(strview) - self['label17'].setText(readline('/etc/hostname')) + self['label17'].setText(readline('/etc/hostname')) self['label19'].setText(readline('%sImagesUpload/.kernel/used_flash_kernel' % getNeoLocation())) strview = UPDATEVERSION self['label10'].setText(strview) - def mytools(self): + def mytools(self): if not fileExists('/.multinfo'): if getTestIn() == getTestOut(): if getAccessN() == '1234': - if (getSupportedTuners()) == (getBoxHostName()): - try: - from Plugins.Extensions.NeoBoot.files.tools import MBTools - self.session.open(MBTools) + if (getSupportedTuners()) == (getBoxHostName()): + try: + from Plugins.Extensions.NeoBoot.files.tools import MBTools + self.session.open(MBTools) #except: except Exception as e: loggscrash = time.localtime(time.time()) @@ -1256,7 +1256,7 @@ class NeoBootImageChoose(Screen): self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) else: myerror = _('Sorry, this is not neoboot vip version.\nGet NEO-VIP version, more info press blue button.') - self.session.open(MessageBox, myerror, MessageBox.TYPE_INFO) + self.session.open(MessageBox, myerror, MessageBox.TYPE_INFO) else: myerror = _('Sorry, this is not neoboot vip version.\nGet NEO-VIP version, more info press blue button or try to update.') @@ -1270,8 +1270,8 @@ class NeoBootImageChoose(Screen): LogCrashGS('%02d:%02d:%d %02d:%02d:%02d - %s\r\n' % (loggscrash.tm_mday, loggscrash.tm_mon, loggscrash.tm_year, loggscrash.tm_hour, loggscrash.tm_min, loggscrash.tm_sec, str(e))) mess = _('Sorry cannot open neo menu. Access Fails with Error code 0x50.') self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) - - def removeIMG(self): + + def removeIMG(self): self.mysel = self['config'].getCurrent() if 'Flash' in self.mysel: self.mysel = 'Flash' @@ -1300,12 +1300,12 @@ class NeoBootImageChoose(Screen): else: self.mysel - def up(self): + def up(self): self.list = [] self['config'].setList(self.list) self.updateList() - def up2(self): + def up2(self): try: self.list = [] self['config'].setList(self.list) @@ -1313,7 +1313,7 @@ class NeoBootImageChoose(Screen): except: print(" ") - def RemoveIMAGE(self, yesno): + def RemoveIMAGE(self, yesno): if yesno: cmd = _("echo -e 'Deleting in progress...\n'") cmd1 = 'chattr -i %sImageBoot/' % getNeoLocation() + self.mysel @@ -1322,7 +1322,7 @@ class NeoBootImageChoose(Screen): else: self.session.open(MessageBox, _('Removing canceled!'), MessageBox.TYPE_INFO) - def ImageInstall(self): + def ImageInstall(self): if not fileExists('/.multinfo'): if getAccessN() != '1234': #%s' % UPDATEVERSION count = 0 @@ -1334,7 +1334,7 @@ class NeoBootImageChoose(Screen): if count > 1: myerror = _('Sorry, you can install up to 2 images, this is not neoboot vip version.\nGet unlimited image installations in VIP version') self.session.open(MessageBox, myerror, MessageBox.TYPE_INFO) - elif int(self.availablespace) < 500: + elif int(self.availablespace) < 500: myerror = _('Not enough free space on /media/ !!\nYou need at least 500Mb free space.\n\nExit plugin.') self.session.open(MessageBox, myerror, MessageBox.TYPE_INFO) else: @@ -1346,7 +1346,7 @@ class NeoBootImageChoose(Screen): myerror = _('Sorry, this is not neoboot vip version.\nGet NEO-VIP version, more info press blue button or try to update.') self.session.open(MessageBox, myerror, MessageBox.TYPE_INFO) else: - self.ImageInstallTestOK() + self.ImageInstallTestOK() def ImageInstallTestOK(self): if int(self.availablespace) < 500: @@ -1365,7 +1365,7 @@ class NeoBootImageChoose(Screen): mess = _('Your receiver is not on the list of supported tuners.\nAccess error with error code 0x71.') self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) - def GOImageInstall(self): + def GOImageInstall(self): if fileExists('/.multinfo'): message = _('Installing new neoboot software, only recommended from Flash!!!\n---Continue ?---') ybox = self.session.openWithCallback(self.installation_image, MessageBox, message, MessageBox.TYPE_YESNO) @@ -1377,11 +1377,11 @@ class NeoBootImageChoose(Screen): def installation_image(self, yesno): if yesno: - self.extractImage() + self.extractImage() else: self.messagebox = self.session.open(MessageBox, _('It is recommended to install new software only from a flash system.\n---NEOBOOT EXIT---'), MessageBox.TYPE_INFO, 10) self.close() - + def extractImage(self): if fileExists('%sImageBoot/.without_copying' % getNeoLocation()): system('rm -f %sImageBoot/.without_copying' % getNeoLocation()) @@ -1423,32 +1423,32 @@ class NeoBootImageChoose(Screen): loggscrash = time.localtime(time.time()) LogCrashGS('%02d:%02d:%d %02d:%02d:%02d - %s\r\n' % (loggscrash.tm_mday, loggscrash.tm_mon, loggscrash.tm_year, loggscrash.tm_hour, loggscrash.tm_min, loggscrash.tm_sec, str(e))) mess = _('Sorry, cannot open instalation menu.\nAccess error with error code 0x72.') - self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) - + self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) + def DownloaderImage(self): if not os.path.exists('/usr/lib/enigma2/python/Plugins/Extensions/ImageDownloader/download.py'): - message = (_('The %sImagesUpload directory is EMPTY!!!\nInstall the plugin to download new image online ?\n --- Continue? ---') % getNeoLocation()) + message = (_('The %sImagesUpload directory is EMPTY!!!\nInstall the plugin to download new image online ?\n --- Continue? ---') % getNeoLocation()) ybox = self.session.openWithCallback(self.ImageDownloader, MessageBox, message, MessageBox.TYPE_YESNO) ybox.setTitle(_('Installation')) elif fileExists('/usr/lib/python3.8') and fileExists('/.multinfo'): - self.session.open(MessageBox, _('Sorry, cannot open neo menu install image.'), type=MessageBox.TYPE_ERROR) + self.session.open(MessageBox, _('Sorry, cannot open neo menu install image.'), type=MessageBox.TYPE_ERROR) else: message = (_('Catalog %sImagesUpload directory is empty\nPlease upload the image files in zip or nfi formats to install') % getNeoLocation()) self.session.open(MessageBox, message, MessageBox.TYPE_INFO) - - def ImageDownloader(self, yesno): - if checkInternet(): + + def ImageDownloader(self, yesno): + if checkInternet(): if yesno: cmd = 'mkdir /tmp/install; touch /tmp/install/plugin.txt; rm -rf /tmp/*.ipk' system(cmd) - if fileExists('/usr/bin/fullwget'): - os.system('cd /tmp; wget http://read.cba.pl/panel_extra/enigma2-plugin-extensions-imagedownloader_2.6_all.ipk') + if fileExists('/usr/bin/fullwget'): + os.system('cd /tmp; wget http://read.cba.pl/panel_extra/enigma2-plugin-extensions-imagedownloader_2.6_all.ipk') if not fileExists('/tmp/enigma2-plugin-extensions-imagedownloader_2.6_all.ipk'): - if fileExists('/usr/bin/curl'): + if fileExists('/usr/bin/curl'): os.system('sync; cd /tmp; curl -O --ftp-ssl http://read.cba.pl/panel_extra/enigma2-plugin-extensions-imagedownloader_2.6_all.ipk') if not fileExists('/tmp/enigma2-plugin-extensions-imagedownloader_2.6_all.ipk'): - if fileExists('/usr/bin/wget'): - os.system('cd /tmp;rm ./*.zip; wget --no-check-certificate http://read.cba.pl/panel_extra/enigma2-plugin-extensions-imagedownloader_2.6_all.ipk') + if fileExists('/usr/bin/wget'): + os.system('cd /tmp;rm ./*.zip; wget --no-check-certificate http://read.cba.pl/panel_extra/enigma2-plugin-extensions-imagedownloader_2.6_all.ipk') if not fileExists('/tmp/enigma2-plugin-extensions-imagedownloader_2.6_all.ipk'): self.session.open(MessageBox, _('Unfortunately, at the moment not found an update, try again later.'), MessageBox.TYPE_INFO, 10) else: @@ -1458,7 +1458,7 @@ class NeoBootImageChoose(Screen): self.close() else: mess = (_('Directory %sImagesUpload is empty\nPlease upload the image files in zip or nfi formats to install') % getNeoLocation()) - self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) + self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) else: mess = _('Geen internet') self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) @@ -1471,9 +1471,9 @@ class NeoBootImageChoose(Screen): myerror = _('Sorry, this is not neoboot vip version.\nGet NEO-VIP version, more info press blue button.') self.session.open(MessageBox, myerror, MessageBox.TYPE_INFO) else: - self.bootIMG2() - - def bootIMG2(self): + self.bootIMG2() + + def bootIMG2(self): self.mysel = self['config'].getCurrent() if 'Flash' in self.mysel: self.mysel = 'Flash' @@ -1481,7 +1481,7 @@ class NeoBootImageChoose(Screen): out = open('' + getNeoLocation() + 'ImageBoot/.neonextboot', 'w') out.write(self.mysel) out.close() - + if getImageNeoBoot() != "Flash": if not fileExists('%sImageBoot/%s/.control_ok' % (getNeoLocation(), getImageNeoBoot())): message = _('After successful launch of the selected software\nyou must run the neoboot plugin\nif the software does not start or neoboot is not confirmed\nthe system will return to the internal flash memory\n\nPress OK or exit on the remote control to continue...') @@ -1504,9 +1504,9 @@ class NeoBootImageChoose(Screen): loggscrash = time.localtime(time.time()) LogCrashGS('%02d:%02d:%d %02d:%02d:%02d - %s\r\n' % (loggscrash.tm_mday, loggscrash.tm_mon, loggscrash.tm_year, loggscrash.tm_hour, loggscrash.tm_min, loggscrash.tm_sec, str(e))) mess = _('Sorry cannot open run file - Access Fails with Error code 0x40.') - self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) - - def StartReboot(self, yesno): + self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) + + def StartReboot(self, yesno): if yesno: try: from Plugins.Extensions.NeoBoot.run import StartImage @@ -1515,11 +1515,11 @@ class NeoBootImageChoose(Screen): loggscrash = time.localtime(time.time()) LogCrashGS('%02d:%02d:%d %02d:%02d:%02d - %s\r\n' % (loggscrash.tm_mday, loggscrash.tm_mon, loggscrash.tm_year, loggscrash.tm_hour, loggscrash.tm_min, loggscrash.tm_sec, str(e))) mess = _('Sorry cannot open neo menu. Hymmm...\nAccess Fails with Error code 0x73.') - self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) + self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) else: self.close() - def myClose(self, message): + def myClose(self, message): self.session.open(MessageBox, message, MessageBox.TYPE_INFO) self.close() @@ -1540,7 +1540,7 @@ def readline(filename, iferror=''): def checkInternet(): - if fileExists('/usr/lib/python3.8'): + if fileExists('/usr/lib/python3.8'): return True else: import urllib2 @@ -1558,7 +1558,7 @@ def checkInternet(): def checkimage(): mycheck = False - if not fileExists('/proc/stb/info') or not fileExists('' + LinkNeoBoot + '/neoskins/neo/neo_skin.py') or not fileExists('' + LinkNeoBoot + '/bin/utilsbh') or not fileExists('' + LinkNeoBoot + '/stbinfo.cfg'): + if not fileExists('/proc/stb/info') or not fileExists('' + LinkNeoBoot + '/neoskins/neo/neo_skin.py') or not fileExists('' + LinkNeoBoot + '/bin/utilsbh') or not fileExists('' + LinkNeoBoot + '/stbinfo.cfg'): mycheck = False else: mycheck = True @@ -1580,16 +1580,16 @@ def main(session, **kwargs): os.system('date "+%Y%m%d" > /tmp/.finishdate') if fileExists('/tmp/.nkod'): pass - else: + else: if not fileExists('/tmp/ver.txt'): - if fileExists('/usr/bin/curl'): + if fileExists('/usr/bin/curl'): os.system('cd /tmp; curl -O --ftp-ssl https://raw.githubusercontent.com/gutosie/neoboot/master/ver.txt; cd /') if not fileExists('/tmp/ver.txt'): - if fileExists('/usr/bin/wget'): - os.system('cd /tmp; wget --no-check-certificate https://raw.githubusercontent.com/gutosie/neoboot/master/ver.txt; cd /') + if fileExists('/usr/bin/wget'): + os.system('cd /tmp; wget --no-check-certificate https://raw.githubusercontent.com/gutosie/neoboot/master/ver.txt; cd /') if not fileExists('/tmp/ver.txt'): - if fileExists('/usr/bin/fullwget'): - os.system('cd /tmp; fullwget --no-check-certificate https://raw.githubusercontent.com/gutosie/neoboot/master/ver.txt; cd /') + if fileExists('/usr/bin/fullwget'): + os.system('cd /tmp; fullwget --no-check-certificate https://raw.githubusercontent.com/gutosie/neoboot/master/ver.txt; cd /') if fileExists('/tmp/ver.txt'): os.system('mv /tmp/ver.txt /tmp/.nkod ;cd /') else: @@ -1610,7 +1610,7 @@ def main(session, **kwargs): if not fileExists('/usr/lib/periodon/.kodn'): session.open(MessageBox, _('Get a free test to the full vip version.'), type=MessageBox.TYPE_ERROR) elif fileExists('/usr/lib/periodon/.kodn') and fileExists('/tmp/.nkod'): - if checkInternet(): + if checkInternet(): if getTestToTest() != UPDATEVERSION: session.open(MessageBox, _('New version update neoboot is available!\nPlease upgrade your flash plugin.'), type=MessageBox.TYPE_ERROR) else: @@ -1619,7 +1619,7 @@ def main(session, **kwargs): session.open(MessageBox, _('VIP access error. Reinstall the plugin.'), type=MessageBox.TYPE_ERROR) if getAccesDate() == 'timeoff': #timeoff session.open(MessageBox, _('Neoboot vip version has expired, please re-access.'), type=MessageBox.TYPE_ERROR) - + version = 0 if fileExists('%sImageBoot/.version' % getNeoLocation()): f = open('%sImageBoot/.version' % getNeoLocation()) @@ -1629,12 +1629,12 @@ def main(session, **kwargs): if fileExists('' + LinkNeoBoot + '/.location') and fileExists('%sImageBoot/.neonextboot' % getNeoLocation()): f2 = open('%sImageBoot/.neonextboot' % getNeoLocation(), 'r') mypath2 = f2.readline().strip() - f2.close() + f2.close() if mypath2 != 'Flash' or mypath2 == 'Flash' and checkimage(): - + if fileExists('/.multinfo'): - session.open(NeoBootImageChoose) - else: + session.open(NeoBootImageChoose) + else: if float(PLUGINVERSION) != version: session.open(MyUpgrade) else: @@ -1648,7 +1648,7 @@ def main(session, **kwargs): session.open(MessageBox, _('Sorry cannot open neo menu. Not supported tuners. '), type=MessageBox.TYPE_ERROR) else: session.open(MessageBox, (_('Sorry, Unable to install, bad satellite receiver or you do not have the full plug-in version\n\nThe full version of the NEO VIP plugin is on address:\nkrzysztofgutosie@.gmail.com')), type=MessageBox.TYPE_ERROR) - + def menu(menuid, **kwargs): if menuid == 'mainmenu': diff --git a/NeoBoot/tmpfiles/runpy/arm_run.py b/NeoBoot/tmpfiles/runpy/arm_run.py index 23446ca..17e9d79 100644 --- a/NeoBoot/tmpfiles/runpy/arm_run.py +++ b/NeoBoot/tmpfiles/runpy/arm_run.py @@ -103,7 +103,7 @@ class StartImage(Screen): else: system('touch %sImageBoot/%s/.control_boot_new_image ' % (getNeoLocation(), getImageNeoBoot())) if fileExists('/.multinfo') and getCPUtype() == 'ARMv7': - os.system(' ' + LinkNeoBoot + '/files/findsk.sh; mkdir -p /media/InternalFlash; mount /tmp/root /media/InternalFlash') + os.system(' ' + LinkNeoBoot + '/files/findsk.sh; mkdir -p /media/InternalFlash; mount /tmp/root /media/InternalFlash') self.sel = self['list'].getCurrent() if self.sel: @@ -121,36 +121,36 @@ class StartImage(Screen): os.system('rm -f /media/InternalFlash/linuxrootfs3/etc/init.d/neobootmount.sh;') elif fileExists('/media/InternalFlash/linuxrootfs4/etc/init.d/neobootmount.sh'): os.system('rm -f /media/InternalFlash/linuxrootfs4/etc/init.d/neobootmount.sh;') -# else: -# pass +# else: +# pass #_____ARM procesor____ - if (getSupportedTuners()): + if (getSupportedTuners()): if getImageNeoBoot() == 'Flash': if fileExists('/.multinfo'): if fileExists('/media/InternalFlash/linuxrootfs1/sbin/neoinitarm'): cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'cd /media/InternalFlash/linuxrootfs1; ln -sfn /sbin/init.sysvinit /media/InternalFlash/linuxrootfs1/sbin/init; sleep 5; reboot -d -f ' + cmd1 = 'cd /media/InternalFlash/linuxrootfs1; ln -sfn /sbin/init.sysvinit /media/InternalFlash/linuxrootfs1/sbin/init; sleep 5; reboot -d -f ' self.session.open(Console, _('NeoBoot-Reboot ....'), [cmd, cmd1]) elif fileExists('/media/InternalFlash/linuxrootfs2/sbin/neoinitarm'): cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'cd /media/InternalFlash/linuxrootfs2; ln -sfn /sbin/init.sysvinit /media/InternalFlash/linuxrootfs2/sbin/init; sleep 5; reboot -d -f ' + cmd1 = 'cd /media/InternalFlash/linuxrootfs2; ln -sfn /sbin/init.sysvinit /media/InternalFlash/linuxrootfs2/sbin/init; sleep 5; reboot -d -f ' self.session.open(Console, _('NeoBoot-Reboot ....'), [cmd, cmd1]) elif fileExists('/media/InternalFlash/linuxrootfs3/sbin/neoinitarm'): cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'cd /media/InternalFlash/linuxrootfs3; ln -sfn /sbin/init.sysvinit /media/InternalFlash/linuxrootfs3/sbin/init; sleep 5; reboot -d -f ' + cmd1 = 'cd /media/InternalFlash/linuxrootfs3; ln -sfn /sbin/init.sysvinit /media/InternalFlash/linuxrootfs3/sbin/init; sleep 5; reboot -d -f ' self.session.open(Console, _('NeoBoot-Reboot ....'), [cmd, cmd1]) elif fileExists('/media/InternalFlash/linuxrootfs4/sbin/neoinitarm'): cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'cd /media/InternalFlash/linuxrootfs4; ln -sfn /sbin/init.sysvinit /media/InternalFlash/linuxrootfs4/sbin/init; sleep 5; reboot -d -f ' + cmd1 = 'cd /media/InternalFlash/linuxrootfs4; ln -sfn /sbin/init.sysvinit /media/InternalFlash/linuxrootfs4/sbin/init; sleep 5; reboot -d -f ' self.session.open(Console, _('NeoBoot-Reboot ....'), [cmd, cmd1]) elif fileExists('/media/InternalFlash/sbin/init'): cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'cd /media/InternalFlash; ln -sfn /sbin/init.sysvinit /media/InternalFlash/sbin/init; sleep 5; reboot -d -f ' - self.session.open(Console, _('NeoBoot-Reboot ....'), [cmd, cmd1]) + cmd1 = 'cd /media/InternalFlash; ln -sfn /sbin/init.sysvinit /media/InternalFlash/sbin/init; sleep 5; reboot -d -f ' + self.session.open(Console, _('NeoBoot-Reboot ....'), [cmd, cmd1]) else: cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'sleep 5; reboot -d -f ' - self.session.open(Console, _('NeoBoot-Reboot ....'), [cmd, cmd1]) + cmd1 = 'sleep 5; reboot -d -f ' + self.session.open(Console, _('NeoBoot-Reboot ....'), [cmd, cmd1]) elif not fileExists('/.multinfo'): cmd = "echo -e '\n\n%s '" % _('NEOBOOT - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...\n') cmd1 = 'sleep 5; ln -sfn /sbin/init.sysvinit /sbin/init; reboot -d -f ' @@ -175,7 +175,7 @@ class StartImage(Screen): else: os.system('echo "Flash " >> ' + getNeoLocation() + 'ImageBoot/.neonextboot') self.messagebox = self.session.open(MessageBox, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8) - self.close() + self.close() else: os.system('echo "Flash " >> ' + getNeoLocation() + 'ImageBoot/.neonextboot') diff --git a/NeoBoot/tmpfiles/runpy/duo4k_run.py b/NeoBoot/tmpfiles/runpy/duo4k_run.py index 93302ed..2605b9c 100644 --- a/NeoBoot/tmpfiles/runpy/duo4k_run.py +++ b/NeoBoot/tmpfiles/runpy/duo4k_run.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- - -#from __init__ import _ -from Plugins.Extensions.NeoBoot.__init__ import _ + +#from __init__ import _ +from Plugins.Extensions.NeoBoot.__init__ import _ from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2, getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 from enigma import getDesktop from enigma import eTimer -from Screens.Screen import Screen +from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Screens.ChoiceBox import ChoiceBox from Screens.VirtualKeyBoard import VirtualKeyBoard @@ -30,7 +30,7 @@ from os import system, listdir, mkdir, chdir, getcwd, rename as os_rename, remov from os.path import dirname, isdir, isdir as os_isdir import os import time -LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' +LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' class StartImage(Screen): @@ -73,7 +73,7 @@ class StartImage(Screen): 'back': self.close}) self['label1'] = Label(_('Start the chosen system now ?')) self['label2'] = Label(_('Select OK to run the image.')) - + def select(self): self.list = [] mypath = '' + LinkNeoBoot + '' @@ -84,76 +84,76 @@ class StartImage(Screen): self.list.append(res) self['list'].list = self.list - def KeyOk(self): - if getImageNeoBoot() != 'Flash': - os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) + def KeyOk(self): + if getImageNeoBoot() != 'Flash': + os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) self.StartImageInNeoBoot() else: - os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) + os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) self.StartImageInNeoBoot() #--------------------------------------------- getMountPointNeo2() #--------------------------------------------- - def StartImageInNeoBoot(self): + def StartImageInNeoBoot(self): if getImageNeoBoot() != 'Flash': - if fileExists('%sImageBoot/%s/.control_ok' % (getNeoLocation(), getImageNeoBoot())): - system('touch /tmp/.control_ok ') + if fileExists('%sImageBoot/%s/.control_ok' % (getNeoLocation(), getImageNeoBoot())): + system('touch /tmp/.control_ok ') else: system('touch %sImageBoot/%s/.control_boot_new_image ' % (getNeoLocation(), getImageNeoBoot())) - if fileExists('/.multinfo') and getCPUtype() == 'ARMv7': - if getBoxVuModel() == 'duo4k': + if fileExists('/.multinfo') and getCPUtype() == 'ARMv7': + if getBoxVuModel() == 'duo4k': os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p9 /media/InternalFlash') - system('chmod 755 ' + LinkNeoBoot + '/files/kernel.sh') + system('chmod 755 ' + LinkNeoBoot + '/files/kernel.sh') self.sel = self['list'].getCurrent() if self.sel: - self.sel = self.sel[2] - if self.sel == 0: + self.sel = self.sel[2] + if self.sel == 0: if fileExists('/media/InternalFlash/etc/init.d/neobootmount.sh'): os.system('rm -f /media/InternalFlash/etc/init.d/neobootmount.sh;') if not fileExists('/bin/busybox.nosuid'): os.system('ln -sf "busybox" "/bin/busybox.nosuid" ') -#################_____ARM____########################## - - #VUPLUS ARM - Duo4k vu_mmcblk0p6.sh +#################_____ARM____########################## + + #VUPLUS ARM - Duo4k vu_mmcblk0p6.sh if getCPUSoC() == '7278' or getBoxHostName() == 'vuduo4k': if not fileExists('%sImagesUpload/.kernel/flash-kernel-%s.bin' % (getNeoLocation(), getBoxHostName())): mess = (_('Error - in the location %sImagesUpload/.kernel/ \nkernel file not found flash-kernel-%s.bin') % (getNeoLocation(), getBoxHostName())) - self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) + self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) else: - if getImageNeoBoot() == 'Flash': - if fileExists('/.multinfo'): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'cd /media/InternalFlash; ln -sf "init.sysvinit" "/media/InternalFlash/sbin/init"; ' + LinkNeoBoot + '/files/kernel.sh ' + if getImageNeoBoot() == 'Flash': + if fileExists('/.multinfo'): + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'cd /media/InternalFlash; ln -sf "init.sysvinit" "/media/InternalFlash/sbin/init"; ' + LinkNeoBoot + '/files/kernel.sh ' - elif not fileExists('/.multinfo'): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'sleep 5; ln -sf "init.sysvinit" "/sbin/init"; reboot -dfhi' + elif not fileExists('/.multinfo'): + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'sleep 5; ln -sf "init.sysvinit" "/sbin/init"; reboot -dfhi' - elif getImageNeoBoot() != 'Flash': - if not fileExists('/.multinfo'): - if not fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'sleep 5; ln -sfn /sbin/neoinitarm /sbin/init; /etc/init.d/reboot' - - elif fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'ln -sfn /sbin/neoinitarmvu /sbin/init; ' + LinkNeoBoot + '/files/kernel.sh ' - - elif fileExists('/.multinfo'): + elif getImageNeoBoot() != 'Flash': + if not fileExists('/.multinfo'): if not fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/mmcblk0p6; cd /media/InternalFlash; ln -sf "neoinitarm" "/media/InternalFlash/sbin/init" ; sleep 2; reboot -dfhi ' - + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'sleep 5; ln -sfn /sbin/neoinitarm /sbin/init; /etc/init.d/reboot' + elif fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'cd /media/InternalFlash; ln -sf "neoinitarmvu" "/media/InternalFlash/sbin/init"; ' + LinkNeoBoot + '/files/kernel.sh ' - + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'ln -sfn /sbin/neoinitarmvu /sbin/init; ' + LinkNeoBoot + '/files/kernel.sh ' + + elif fileExists('/.multinfo'): + if not fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/mmcblk0p6; cd /media/InternalFlash; ln -sf "neoinitarm" "/media/InternalFlash/sbin/init" ; sleep 2; reboot -dfhi ' + + elif fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'cd /media/InternalFlash; ln -sf "neoinitarmvu" "/media/InternalFlash/sbin/init"; ' + LinkNeoBoot + '/files/kernel.sh ' + self.session.open(Console, _('NeoBoot ARM '), [cmd, cmd1]) - self.close() - + self.close() + else: os.system('echo "Flash " >> ' + getNeoLocation() + 'ImageBoot/.neonextboot') self.messagebox = self.session.open(MessageBox, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8) diff --git a/NeoBoot/tmpfiles/runpy/duo4kse_run.py b/NeoBoot/tmpfiles/runpy/duo4kse_run.py index 77de43b..30f7b20 100644 --- a/NeoBoot/tmpfiles/runpy/duo4kse_run.py +++ b/NeoBoot/tmpfiles/runpy/duo4kse_run.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- - -#from __init__ import _ -from Plugins.Extensions.NeoBoot.__init__ import _ + +#from __init__ import _ +from Plugins.Extensions.NeoBoot.__init__ import _ from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2, getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 from enigma import getDesktop from enigma import eTimer -from Screens.Screen import Screen +from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Screens.ChoiceBox import ChoiceBox from Screens.VirtualKeyBoard import VirtualKeyBoard @@ -30,7 +30,7 @@ from os import system, listdir, mkdir, chdir, getcwd, rename as os_rename, remov from os.path import dirname, isdir, isdir as os_isdir import os import time -LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' +LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' class StartImage(Screen): @@ -73,7 +73,7 @@ class StartImage(Screen): 'back': self.close}) self['label1'] = Label(_('Start the chosen system now ?')) self['label2'] = Label(_('Select OK to run the image.')) - + def select(self): self.list = [] mypath = '' + LinkNeoBoot + '' @@ -84,76 +84,76 @@ class StartImage(Screen): self.list.append(res) self['list'].list = self.list - def KeyOk(self): - if getImageNeoBoot() != 'Flash': - os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) + def KeyOk(self): + if getImageNeoBoot() != 'Flash': + os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) self.StartImageInNeoBoot() else: - os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) + os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) self.StartImageInNeoBoot() #--------------------------------------------- getMountPointNeo2() #---------------------------------------------') - def StartImageInNeoBoot(self): + def StartImageInNeoBoot(self): if getImageNeoBoot() != 'Flash': - if fileExists('%sImageBoot/%s/.control_ok' % (getNeoLocation(), getImageNeoBoot())): - system('touch /tmp/.control_ok ') + if fileExists('%sImageBoot/%s/.control_ok' % (getNeoLocation(), getImageNeoBoot())): + system('touch /tmp/.control_ok ') else: system('touch %sImageBoot/%s/.control_boot_new_image ' % (getNeoLocation(), getImageNeoBoot())) - if fileExists('/.multinfo') and getCPUtype() == 'ARMv7': - if getBoxVuModel() == 'duo4kse': + if fileExists('/.multinfo') and getCPUtype() == 'ARMv7': + if getBoxVuModel() == 'duo4kse': os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p9 /media/InternalFlash') - system('chmod 755 ' + LinkNeoBoot + '/files/kernel.sh') + system('chmod 755 ' + LinkNeoBoot + '/files/kernel.sh') self.sel = self['list'].getCurrent() if self.sel: - self.sel = self.sel[2] - if self.sel == 0: + self.sel = self.sel[2] + if self.sel == 0: if fileExists('/media/InternalFlash/etc/init.d/neobootmount.sh'): os.system('rm -f /media/InternalFlash/etc/init.d/neobootmount.sh;') if not fileExists('/bin/busybox.nosuid'): os.system('ln -sf "busybox" "/bin/busybox.nosuid" ') -#################_____ARM____########################## - - #VUPLUS ARM - Duo4kse vu_mmcblk0p6.sh +#################_____ARM____########################## + + #VUPLUS ARM - Duo4kse vu_mmcblk0p6.sh if getCPUSoC() == '7444s' or getBoxHostName() == 'vuduo4kse' and getBoxHostName() != 'vuultimo4k': if not fileExists('%sImagesUpload/.kernel/flash-kernel-%s.bin' % (getNeoLocation(), getBoxHostName())): mess = (_('Error - in the location %sImagesUpload/.kernel/ \nkernel file not found flash-kernel-%s.bin') % (getNeoLocation(), getBoxHostName())) - self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) + self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) else: - if getImageNeoBoot() == 'Flash': - if fileExists('/.multinfo'): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'cd /media/InternalFlash; ln -sf "init.sysvinit" "/media/InternalFlash/sbin/init"; ' + LinkNeoBoot + '/files/kernel.sh ' + if getImageNeoBoot() == 'Flash': + if fileExists('/.multinfo'): + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'cd /media/InternalFlash; ln -sf "init.sysvinit" "/media/InternalFlash/sbin/init"; ' + LinkNeoBoot + '/files/kernel.sh ' - elif not fileExists('/.multinfo'): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'sleep 5; ln -sf "init.sysvinit" "/sbin/init"; reboot -dfhi' + elif not fileExists('/.multinfo'): + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'sleep 5; ln -sf "init.sysvinit" "/sbin/init"; reboot -dfhi' - elif getImageNeoBoot() != 'Flash': - if not fileExists('/.multinfo'): - if not fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'sleep 5; ln -sfn /sbin/neoinitarm /sbin/init; /etc/init.d/reboot' - - elif fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'ln -sfn /sbin/neoinitarmvu /sbin/init; ' + LinkNeoBoot + '/files/kernel.sh ' - - elif fileExists('/.multinfo'): + elif getImageNeoBoot() != 'Flash': + if not fileExists('/.multinfo'): if not fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/mmcblk0p6; cd /media/InternalFlash; ln -sf "neoinitarm" "/media/InternalFlash/sbin/init" ; sleep 2; reboot -dfhi ' - + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'sleep 5; ln -sfn /sbin/neoinitarm /sbin/init; /etc/init.d/reboot' + elif fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'cd /media/InternalFlash; ln -sf "neoinitarmvu" "/media/InternalFlash/sbin/init"; ' + LinkNeoBoot + '/files/kernel.sh ' - + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'ln -sfn /sbin/neoinitarmvu /sbin/init; ' + LinkNeoBoot + '/files/kernel.sh ' + + elif fileExists('/.multinfo'): + if not fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/mmcblk0p6; cd /media/InternalFlash; ln -sf "neoinitarm" "/media/InternalFlash/sbin/init" ; sleep 2; reboot -dfhi ' + + elif fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'cd /media/InternalFlash; ln -sf "neoinitarmvu" "/media/InternalFlash/sbin/init"; ' + LinkNeoBoot + '/files/kernel.sh ' + self.session.open(Console, _('NeoBoot ARM '), [cmd, cmd1]) - self.close() - + self.close() + else: os.system('echo "Flash " >> ' + getNeoLocation() + 'ImageBoot/.neonextboot') self.messagebox = self.session.open(MessageBox, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8) diff --git a/NeoBoot/tmpfiles/runpy/mips_run.py b/NeoBoot/tmpfiles/runpy/mips_run.py index 892265c..18c3280 100644 --- a/NeoBoot/tmpfiles/runpy/mips_run.py +++ b/NeoBoot/tmpfiles/runpy/mips_run.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- -from Plugins.Extensions.NeoBoot.__init__ import _ +from Plugins.Extensions.NeoBoot.__init__ import _ from Plugins.Extensions.NeoBoot.files.stbbranding import getSupportedTuners, getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2, getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 from enigma import getDesktop from enigma import eTimer -from Screens.Screen import Screen +from Screens.Screen import Screen from Screens.Console import Console -from Screens.MessageBox import MessageBox +from Screens.MessageBox import MessageBox from Screens.ChoiceBox import ChoiceBox from Screens.VirtualKeyBoard import VirtualKeyBoard from Screens.Standby import TryQuitMainloop @@ -28,7 +28,7 @@ from Tools.Directories import fileExists, pathExists, createDir, resolveFilename 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 import os -import time +import time LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' @@ -72,7 +72,7 @@ class StartImage(Screen): 'back': self.close}) self['label1'] = Label(_('Start the chosen system now ?')) self['label2'] = Label(_('Select OK to run the image.')) - + def select(self): self.list = [] mypath = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' @@ -83,33 +83,33 @@ class StartImage(Screen): self.list.append(res) self['list'].list = self.list - def KeyOk(self): - if getImageNeoBoot() != 'Flash': - os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) + def KeyOk(self): + if getImageNeoBoot() != 'Flash': + os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) self.StartImageInNeoBoot() else: - os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) + os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) self.StartImageInNeoBoot() #--------------------------------------------- getMountPointNeo2() #--------------------------------------------- - def StartImageInNeoBoot(self): + def StartImageInNeoBoot(self): if getImageNeoBoot() != 'Flash': - if fileExists('%sImageBoot/%s/.control_ok' % (getNeoLocation(), getImageNeoBoot())): - system('touch /tmp/.control_ok ') + if fileExists('%sImageBoot/%s/.control_ok' % (getNeoLocation(), getImageNeoBoot())): + system('touch /tmp/.control_ok ') else: system('touch %sImageBoot/%s/.control_boot_new_image ' % (getNeoLocation(), getImageNeoBoot())) - #system('chmod 755 /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh') + #system('chmod 755 /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh') self.sel = self['list'].getCurrent() if self.sel: - self.sel = self.sel[2] - if self.sel == 0: + self.sel = self.sel[2] + if self.sel == 0: if fileExists('/media/InternalFlash/etc/init.d/neobootmount.sh'): os.system('rm -f /media/InternalFlash/etc/init.d/neobootmount.sh;') - if (getSupportedTuners()): - if getImageNeoBoot() == 'Flash': + if (getSupportedTuners()): + if getImageNeoBoot() == 'Flash': cmd = "echo -e '\n\n%s '" % _('NEOBOOT - Restart image flash....\nPlease wait, in a moment the decoder will be restarted...\n') cmd1 = 'sleep 8; ln -sfn /sbin/init.sysvinit /sbin/init; reboot -f ' self.session.open(Console, _('NeoBoot ....'), [cmd, cmd1]) @@ -129,10 +129,9 @@ class StartImage(Screen): else: os.system('echo "Flash " >> ' + getNeoLocation() + 'ImageBoot/.neonextboot') self.messagebox = self.session.open(MessageBox, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8) - self.close() + self.close() else: os.system('echo "Flash " >> ' + getNeoLocation() + 'ImageBoot/.neonextboot') self.messagebox = self.session.open(MessageBox, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8) self.close() - diff --git a/NeoBoot/tmpfiles/runpy/vu4k_run.py b/NeoBoot/tmpfiles/runpy/vu4k_run.py index e2a3409..928a283 100644 --- a/NeoBoot/tmpfiles/runpy/vu4k_run.py +++ b/NeoBoot/tmpfiles/runpy/vu4k_run.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- #from __init__ import _ -from Plugins.Extensions.NeoBoot.__init__ import _ +from Plugins.Extensions.NeoBoot.__init__ import _ #from __future__ import print_function from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2, getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 from enigma import getDesktop from enigma import eTimer -from Screens.Screen import Screen +from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Screens.ChoiceBox import ChoiceBox from Screens.VirtualKeyBoard import VirtualKeyBoard @@ -30,7 +30,7 @@ from Tools.Directories import fileExists, pathExists, createDir, resolveFilename 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 import os -import time +import time LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' diff --git a/NeoBoot/tmpfiles/runpy/vu_mtd1_run.py b/NeoBoot/tmpfiles/runpy/vu_mtd1_run.py index 0fa3bf7..db6cec2 100644 --- a/NeoBoot/tmpfiles/runpy/vu_mtd1_run.py +++ b/NeoBoot/tmpfiles/runpy/vu_mtd1_run.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- - -from Plugins.Extensions.NeoBoot.__init__ import _ + +from Plugins.Extensions.NeoBoot.__init__ import _ from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2, getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 from enigma import getDesktop from enigma import eTimer -from Screens.Screen import Screen +from Screens.Screen import Screen from Screens.Console import Console from Screens.MessageBox import MessageBox from Screens.ChoiceBox import ChoiceBox @@ -28,7 +28,7 @@ from Tools.Directories import fileExists, pathExists, createDir, resolveFilename 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 import os -import time +import time LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' @@ -72,7 +72,7 @@ class StartImage(Screen): 'back': self.close}) self['label1'] = Label(_('Start the chosen system now ?')) self['label2'] = Label(_('Select OK to run the image.')) - + def select(self): self.list = [] mypath = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' @@ -83,66 +83,66 @@ class StartImage(Screen): self.list.append(res) self['list'].list = self.list - def KeyOk(self): - if getImageNeoBoot() != 'Flash': - os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) + def KeyOk(self): + if getImageNeoBoot() != 'Flash': + os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) self.StartImageInNeoBoot() else: - os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) + os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) self.StartImageInNeoBoot() #--------------------------------------------- getMountPointNeo2() #--------------------------------------------- - def StartImageInNeoBoot(self): + def StartImageInNeoBoot(self): if getImageNeoBoot() != 'Flash': - if fileExists('%sImageBoot/%s/.control_ok' % (getNeoLocation(), getImageNeoBoot())): - system('touch /tmp/.control_ok ') + if fileExists('%sImageBoot/%s/.control_ok' % (getNeoLocation(), getImageNeoBoot())): + system('touch /tmp/.control_ok ') else: system('touch %sImageBoot/%s/.control_boot_new_image ' % (getNeoLocation(), getImageNeoBoot())) - system('chmod 755 /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh') + system('chmod 755 /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh') self.sel = self['list'].getCurrent() if self.sel: - self.sel = self.sel[2] - if self.sel == 0: + self.sel = self.sel[2] + if self.sel == 0: if fileExists('/media/InternalFlash/etc/init.d/neobootmount.sh'): os.system('rm -f /media/InternalFlash/etc/init.d/neobootmount.sh;') if not fileExists('/bin/busybox.nosuid'): os.system('ln -sf "busybox" "/bin/busybox.nosuid" ') -#################_____mips___########################## - - #VUPLUS MIPS vu_dev_mtd1.sh - if getBoxHostName() == 'vuultimo' or getBoxHostName() == 'bm750' or getBoxHostName() == 'vuduo' or getBoxHostName() == 'vuuno' or getBoxHostName() == 'vusolo' or getBoxHostName() == 'vuduo': +#################_____mips___########################## + + #VUPLUS MIPS vu_dev_mtd1.sh + if getBoxHostName() == 'vuultimo' or getBoxHostName() == 'bm750' or getBoxHostName() == 'vuduo' or getBoxHostName() == 'vuuno' or getBoxHostName() == 'vusolo' or getBoxHostName() == 'vuduo': if not fileExists('%sImagesUpload/.kernel/%s.vmlinux.gz' % (getNeoLocation(), getBoxHostName())): - self.myclose2(_('Error - in the location %sImagesUpload/.kernel/ \nkernel file not found flash kernel vmlinux.gz ' % getNeoLocation())) - else: - if getImageNeoBoot() == 'Flash': - if fileExists('/.multinfo'): - cmd = "echo -e '\n\n%s '" % _('...............NeoBoot REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh' + self.myclose2(_('Error - in the location %sImagesUpload/.kernel/ \nkernel file not found flash kernel vmlinux.gz ' % getNeoLocation())) + else: + if getImageNeoBoot() == 'Flash': + if fileExists('/.multinfo'): + cmd = "echo -e '\n\n%s '" % _('...............NeoBoot REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh' elif not fileExists('/.multinfo'): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT >> Reboot...............\nPlease wait, in a moment the decoder will be restarted...') + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT >> Reboot...............\nPlease wait, in a moment the decoder will be restarted...') cmd1 = 'ln -sfn /sbin/init.sysvinit /sbin/init; /etc/init.d/reboot' - elif getImageNeoBoot() != 'Flash': - if not fileExists('/.multinfo'): + elif getImageNeoBoot() != 'Flash': + if not fileExists('/.multinfo'): if fileExists('' + getNeoLocation() + 'ImageBoot/' + getImageNeoBoot() + '/boot/' + getBoxHostName() + '.vmlinux.gz'): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT-REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'ln -sfn /sbin/neoinitmipsvu /sbin/init; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh' + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT-REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'ln -sfn /sbin/neoinitmipsvu /sbin/init; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh' elif not fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT > REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'ln -sfn /sbin/neoinitmipsvu /sbin/init; /etc/init.d/reboot' + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT > REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'ln -sfn /sbin/neoinitmipsvu /sbin/init; /etc/init.d/reboot' - elif fileExists('/.multinfo'): + elif fileExists('/.multinfo'): if not fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT_REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT_REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') cmd1 = 'flash_eraseall /dev/mtd1; sleep 2; ' + LinkNeoBoot + '/bin/nandwrite -p /dev/mtd1 %sImagesUpload/.kernel/%s.vmlinux.gz; /etc/init.d/reboot' % (getNeoLocation(), getBoxHostName()) elif fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = "echo -e '\n\n%s '" % _('...............REBOOT now...............\nPlease wait, in a moment the decoder will be restarted...') + cmd = "echo -e '\n\n%s '" % _('...............REBOOT now...............\nPlease wait, in a moment the decoder will be restarted...') cmd1 = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh' self.session.open(Console, _('NeoBoot MIPS....'), [cmd, cmd1]) diff --git a/NeoBoot/tmpfiles/runpy/vu_mtd2_run.py b/NeoBoot/tmpfiles/runpy/vu_mtd2_run.py index 626d262..f4d6a83 100644 --- a/NeoBoot/tmpfiles/runpy/vu_mtd2_run.py +++ b/NeoBoot/tmpfiles/runpy/vu_mtd2_run.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- - -from Plugins.Extensions.NeoBoot.__init__ import _ + +from Plugins.Extensions.NeoBoot.__init__ import _ from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2, getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 from enigma import getDesktop from enigma import eTimer -from Screens.Screen import Screen +from Screens.Screen import Screen from Screens.Console import Console from Screens.MessageBox import MessageBox from Screens.ChoiceBox import ChoiceBox @@ -28,7 +28,7 @@ from Tools.Directories import fileExists, pathExists, createDir, resolveFilename 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 import os -import time +import time LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' @@ -72,7 +72,7 @@ class StartImage(Screen): 'back': self.close}) self['label1'] = Label(_('Start the chosen system now ?')) self['label2'] = Label(_('Select OK to run the image.')) - + def select(self): self.list = [] mypath = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' @@ -83,66 +83,66 @@ class StartImage(Screen): self.list.append(res) self['list'].list = self.list - def KeyOk(self): - if getImageNeoBoot() != 'Flash': - os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) + def KeyOk(self): + if getImageNeoBoot() != 'Flash': + os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) self.StartImageInNeoBoot() else: - os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) + os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) self.StartImageInNeoBoot() #--------------------------------------------- getMountPointNeo2() #--------------------------------------------- - def StartImageInNeoBoot(self): + def StartImageInNeoBoot(self): if getImageNeoBoot() != 'Flash': - if fileExists('%sImageBoot/%s/.control_ok' % (getNeoLocation(), getImageNeoBoot())): - system('touch /tmp/.control_ok ') + if fileExists('%sImageBoot/%s/.control_ok' % (getNeoLocation(), getImageNeoBoot())): + system('touch /tmp/.control_ok ') else: system('touch %sImageBoot/%s/.control_boot_new_image ' % (getNeoLocation(), getImageNeoBoot())) - system('chmod 755 /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh') + system('chmod 755 /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh') self.sel = self['list'].getCurrent() if self.sel: - self.sel = self.sel[2] - if self.sel == 0: + self.sel = self.sel[2] + if self.sel == 0: if fileExists('/media/InternalFlash/etc/init.d/neobootmount.sh'): os.system('rm -f /media/InternalFlash/etc/init.d/neobootmount.sh;') if not fileExists('/bin/busybox.nosuid'): os.system('ln -sf "busybox" "/bin/busybox.nosuid" ') -#################_____mips___########################## - - #VUPLUS MIPS vu_dev_mtd2.sh - if getBoxHostName() == 'vusolo2' or getBoxHostName() == 'vusolose' or getBoxHostName() == 'vuduo2' or getBoxHostName() == 'vuzero': +#################_____mips___########################## + + #VUPLUS MIPS vu_dev_mtd2.sh + if getBoxHostName() == 'vusolo2' or getBoxHostName() == 'vusolose' or getBoxHostName() == 'vuduo2' or getBoxHostName() == 'vuzero': if not fileExists('%sImagesUpload/.kernel/%s.vmlinux.gz' % (getNeoLocation(), getBoxHostName())): - self.myclose2(_('Error - in the location %sImagesUpload/.kernel/ \nkernel file not found flash kernel vmlinux.gz ' % getNeoLocation())) - else: - if getImageNeoBoot() == 'Flash': - if fileExists('/.multinfo'): - cmd = "echo -e '\n\n%s '" % _('...............NeoBoot REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh' + self.myclose2(_('Error - in the location %sImagesUpload/.kernel/ \nkernel file not found flash kernel vmlinux.gz ' % getNeoLocation())) + else: + if getImageNeoBoot() == 'Flash': + if fileExists('/.multinfo'): + cmd = "echo -e '\n\n%s '" % _('...............NeoBoot REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh' elif not fileExists('/.multinfo'): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT >> Reboot...............\nPlease wait, in a moment the decoder will be restarted...') + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT >> Reboot...............\nPlease wait, in a moment the decoder will be restarted...') cmd1 = 'ln -sfn /sbin/init.sysvinit /sbin/init; /etc/init.d/reboot' - elif getImageNeoBoot() != 'Flash': - if not fileExists('/.multinfo'): + elif getImageNeoBoot() != 'Flash': + if not fileExists('/.multinfo'): if fileExists('' + getNeoLocation() + 'ImageBoot/' + getImageNeoBoot() + '/boot/' + getBoxHostName() + '.vmlinux.gz'): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT-REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'ln -sfn /sbin/neoinitmipsvu /sbin/init; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh' + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT-REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'ln -sfn /sbin/neoinitmipsvu /sbin/init; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh' elif not fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT > REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'ln -sfn /sbin/neoinitmipsvu /sbin/init; /etc/init.d/reboot' + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT > REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'ln -sfn /sbin/neoinitmipsvu /sbin/init; /etc/init.d/reboot' - elif fileExists('/.multinfo'): + elif fileExists('/.multinfo'): if not fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT_REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT_REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') cmd1 = 'flash_eraseall /dev/mtd2; sleep 2; ' + LinkNeoBoot + '/bin/nandwrite -p /dev/mtd2 %sImagesUpload/.kernel/%s.vmlinux.gz; /etc/init.d/reboot' % (getNeoLocation(), getBoxHostName()) elif fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = "echo -e '\n\n%s '" % _('...............REBOOT now...............\nPlease wait, in a moment the decoder will be restarted...') + cmd = "echo -e '\n\n%s '" % _('...............REBOOT now...............\nPlease wait, in a moment the decoder will be restarted...') cmd1 = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh' self.session.open(Console, _('NeoBoot MIPS....'), [cmd, cmd1]) diff --git a/NeoBoot/tmpfiles/runpy/zero4k_run.py b/NeoBoot/tmpfiles/runpy/zero4k_run.py index 650e4cc..a7f3954 100644 --- a/NeoBoot/tmpfiles/runpy/zero4k_run.py +++ b/NeoBoot/tmpfiles/runpy/zero4k_run.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- - -from Plugins.Extensions.NeoBoot.__init__ import _ + +from Plugins.Extensions.NeoBoot.__init__ import _ from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getNeoMount, getNeoMount2, getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2 from enigma import getDesktop from enigma import eTimer -from Screens.Screen import Screen +from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Screens.ChoiceBox import ChoiceBox from Screens.VirtualKeyBoard import VirtualKeyBoard @@ -28,8 +28,8 @@ from Tools.Directories import fileExists, pathExists, createDir, resolveFilename 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 import os -import time -LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' +import time +LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' class StartImage(Screen): @@ -72,7 +72,7 @@ class StartImage(Screen): 'back': self.close}) self['label1'] = Label(_('Start the chosen system now ?')) self['label2'] = Label(_('Select OK to run the image.')) - + def select(self): self.list = [] mypath = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' @@ -83,75 +83,75 @@ class StartImage(Screen): self.list.append(res) self['list'].list = self.list - def KeyOk(self): - if getImageNeoBoot() != 'Flash': - os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) + def KeyOk(self): + if getImageNeoBoot() != 'Flash': + os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) self.StartImageInNeoBoot() else: - os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) + os.system('rm -rf %sImageBoot/%s/usr/bin/enigma2_pre_start.sh' % (getNeoLocation(), getImageNeoBoot())) self.StartImageInNeoBoot() #--------------------------------------------- getMountPointNeo2() #--------------------------------------------- - def StartImageInNeoBoot(self): + def StartImageInNeoBoot(self): if getImageNeoBoot() != 'Flash': - if fileExists('%sImageBoot/%s/.control_ok' % (getNeoLocation(), getImageNeoBoot())): - system('touch /tmp/.control_ok ') + if fileExists('%sImageBoot/%s/.control_ok' % (getNeoLocation(), getImageNeoBoot())): + system('touch /tmp/.control_ok ') else: system('touch %sImageBoot/%s/.control_boot_new_image ' % (getNeoLocation(), getImageNeoBoot())) - if fileExists('/.multinfo') and getCPUtype() == 'ARMv7': + if fileExists('/.multinfo') and getCPUtype() == 'ARMv7': if getBoxVuModel() == 'zero4k': os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p7 /media/InternalFlash') - system('chmod 755 ' + LinkNeoBoot + '/files/kernel.sh') + system('chmod 755 ' + LinkNeoBoot + '/files/kernel.sh') self.sel = self['list'].getCurrent() if self.sel: - self.sel = self.sel[2] - if self.sel == 0: + self.sel = self.sel[2] + if self.sel == 0: if fileExists('/media/InternalFlash/etc/init.d/neobootmount.sh'): os.system('rm -f /media/InternalFlash/etc/init.d/neobootmount.sh;') if not fileExists('/bin/busybox.nosuid'): os.system('ln -sf "busybox" "/bin/busybox.nosuid" ') -#################_____ARM____########################## - #VUPLUS ARM - Zero4k vu_mmcblk0p4.sh - if getBoxHostName() == 'vuzero4k' or getCPUSoC() == '72604': +#################_____ARM____########################## + #VUPLUS ARM - Zero4k vu_mmcblk0p4.sh + if getBoxHostName() == 'vuzero4k' or getCPUSoC() == '72604': if not fileExists('%sImagesUpload/.kernel/flash-kernel-%s.bin' % (getNeoLocation(), getBoxHostName())): mess = (_('Error - in the location %sImagesUpload/.kernel/ \nkernel file not found flash-kernel-%s.bin') % (getNeoLocation(), getBoxHostName())) - self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) + self.session.open(MessageBox, mess, MessageBox.TYPE_INFO) else: - if getImageNeoBoot() == 'Flash': - if fileExists('/.multinfo'): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'cd /media/InternalFlash; ln -sf "init.sysvinit" "/media/InternalFlash/sbin/init"; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh ' + if getImageNeoBoot() == 'Flash': + if fileExists('/.multinfo'): + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'cd /media/InternalFlash; ln -sf "init.sysvinit" "/media/InternalFlash/sbin/init"; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh ' - elif not fileExists('/.multinfo'): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'sleep 5; ln -sf "init.sysvinit" "/sbin/init"; reboot -dfhi' + elif not fileExists('/.multinfo'): + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'sleep 5; ln -sf "init.sysvinit" "/sbin/init"; reboot -dfhi' - elif getImageNeoBoot() != 'Flash': - if not fileExists('/.multinfo'): - if not fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'sleep 5; ln -sfn /sbin/neoinitarm /sbin/init; /etc/init.d/reboot' - - elif fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'ln -sfn /sbin/neoinitarmvu /sbin/init; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh ' - - elif fileExists('/.multinfo'): + elif getImageNeoBoot() != 'Flash': + if not fileExists('/.multinfo'): if not fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/mmcblk0p1; cd /media/InternalFlash; ln -sf "neoinitarm" "/media/InternalFlash/sbin/init" ; sleep 2; reboot -dfhi ' - + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'sleep 5; ln -sfn /sbin/neoinitarm /sbin/init; /etc/init.d/reboot' + elif fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): - cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') - cmd1 = 'cd /media/InternalFlash; ln -sf "neoinitarmvu" "/media/InternalFlash/sbin/init"; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh ' - + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'ln -sfn /sbin/neoinitarmvu /sbin/init; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh ' + + elif fileExists('/.multinfo'): + if not fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/mmcblk0p1; cd /media/InternalFlash; ln -sf "neoinitarm" "/media/InternalFlash/sbin/init" ; sleep 2; reboot -dfhi ' + + elif fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())): + cmd = "echo -e '\n\n%s '" % _('...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...') + cmd1 = 'cd /media/InternalFlash; ln -sf "neoinitarmvu" "/media/InternalFlash/sbin/init"; /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/files/kernel.sh ' + self.session.open(Console, _('NeoBoot ARM VU'), [cmd, cmd1]) - self.close() - + self.close() + else: os.system('echo "Flash " >> ' + getNeoLocation() + 'ImageBoot/.neonextboot') self.messagebox = self.session.open(MessageBox, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8) diff --git a/NeoBoot/ubi_reader_arm/ubi_extract_files.py b/NeoBoot/ubi_reader_arm/ubi_extract_files.py index c4e0384..1ca8137 100644 --- a/NeoBoot/ubi_reader_arm/ubi_extract_files.py +++ b/NeoBoot/ubi_reader_arm/ubi_extract_files.py @@ -5,7 +5,7 @@ import sys #import argparse_neo try: import argparse -except: +except: import argparse_neo from ubi import ubi, get_peb_size from ubifs import ubifs @@ -18,7 +18,7 @@ if __name__ == '__main__': # parser = argparse_neo.ArgumentParser(usage=usage, description=description) try: parser = argparse.ArgumentParser(usage=usage, description=description) - except: + except: parser = argparse_neo.ArgumentParser(usage=usage, description=description) parser.add_argument('-l', '--log-file', dest='logpath', help='Log output to file output/LOGPATH. (default: ubifs_output.log)') parser.add_argument('-k', '--keep-permissions', action='store_true', dest='permissions', help='Maintain file permissions, requires running as root. (default: False)') @@ -70,4 +70,4 @@ if __name__ == '__main__': print 'Wait almost over ...\nLoading the image to: %s' % vol_out_path extract_files(uubifs, vol_out_path, perms) - sys.exit(0) \ No newline at end of file + sys.exit(0) diff --git a/NeoBoot/ubi_reader_mips/ubi_extract_files.py b/NeoBoot/ubi_reader_mips/ubi_extract_files.py index 283ac01..6891503 100644 --- a/NeoBoot/ubi_reader_mips/ubi_extract_files.py +++ b/NeoBoot/ubi_reader_mips/ubi_extract_files.py @@ -4,18 +4,18 @@ import os import sys try: import argparse -except: - import argparse_neo +except: + import argparse_neo from ubi import ubi, get_peb_size from ubifs import ubifs from ubi_io import ubi_file, leb_virtual_file from ui.common import extract_files, output_dir -if __name__ == '__main__': +if __name__ == '__main__': description = 'Extract contents of UBI image.' usage = 'ubi_extract_files.py [options] filepath' try: parser = argparse.ArgumentParser(usage=usage, description=description) - except: + except: parser = argparse_neo.ArgumentParser(usage=usage, description=description) parser.add_argument('-l', '--log-file', dest='logpath', help='Log output to file output/LOGPATH. (default: ubifs_output.log)') parser.add_argument('-k', '--keep-permissions', action='store_true', dest='permissions', help='Maintain file permissions, requires running as root. (default: False)') @@ -67,4 +67,4 @@ if __name__ == '__main__': print 'Writing to: %s' % vol_out_path extract_files(uubifs, vol_out_path, perms) - sys.exit(0) \ No newline at end of file + sys.exit(0) diff --git a/NeoBoot/ubi_reader_mips/ui/__init__.py b/NeoBoot/ubi_reader_mips/ui/__init__.py index 8b13789..e69de29 100644 --- a/NeoBoot/ubi_reader_mips/ui/__init__.py +++ b/NeoBoot/ubi_reader_mips/ui/__init__.py @@ -1 +0,0 @@ - diff --git a/NeoBoot/unpack.py b/NeoBoot/unpack.py index 14bd424..76af183 100644 --- a/NeoBoot/unpack.py +++ b/NeoBoot/unpack.py @@ -1,11 +1,11 @@ -# -*- coding: utf-8 -*- - -#from __init__ import _ -from Plugins.Extensions.NeoBoot.__init__ import _ +# -*- coding: utf-8 -*- + +#from __init__ import _ +from Plugins.Extensions.NeoBoot.__init__ import _ from Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getKernelVersionString, getKernelImageVersion, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getTunerModel from enigma import getDesktop from enigma import eTimer -from Screens.Screen import Screen +from Screens.Screen import Screen from Screens.Console import Console from Screens.MessageBox import MessageBox from Screens.ChoiceBox import ChoiceBox @@ -29,12 +29,12 @@ from Tools.Directories import fileExists, pathExists, createDir, resolveFilename 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 import os -import time -if fileExists('/etc/vtiversion.info') or fileExists('/etc/bhversion') or fileExists('/usr/lib/python3.8') and fileExists('/.multinfo'): - from Screens.Console import Console +import time +if fileExists('/etc/vtiversion.info') or fileExists('/etc/bhversion') or fileExists('/usr/lib/python3.8') and fileExists('/.multinfo'): + from Screens.Console import Console else: try: - from Plugins.Extensions.NeoBoot.files.neoconsole import Console + from Plugins.Extensions.NeoBoot.files.neoconsole import Console except: from Screens.Console import Console LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot' @@ -61,7 +61,7 @@ def isUHD(): class InstallImage(Screen, ConfigListScreen): - if isFHD(): + if isFHD(): skin = """ @@ -98,7 +98,7 @@ class InstallImage(Screen, ConfigListScreen): def __init__(self, session): Screen.__init__(self, session) fn = 'NewImage' - sourcelist = [] + sourcelist = [] for fn in os.listdir('%sImagesUpload' % getNeoLocation()): if fn.find('.zip') != -1: fn = fn.replace('.zip', '') @@ -107,15 +107,15 @@ class InstallImage(Screen, ConfigListScreen): if fn.find('.rar') != -1: fn = fn.replace('.rar', '') sourcelist.append((fn, fn)) - continue + continue if fn.find('.tar.xz') != -1: fn = fn.replace('.tar.xz', '') - sourcelist.append((fn, fn)) + sourcelist.append((fn, fn)) continue if fn.find('.tar.gz') != -1: fn = fn.replace('.tar.gz', '') sourcelist.append((fn, fn)) - continue + continue if fn.find('.tar.bz2') != -1: fn = fn.replace('.tar.bz2', '') sourcelist.append((fn, fn)) @@ -123,7 +123,7 @@ class InstallImage(Screen, ConfigListScreen): if fn.find('.mb') != -1: fn = fn.replace('.mb', '') sourcelist.append((fn, fn)) - continue + continue if fn.find('.nfi') != -1: fn = fn.replace('.nfi', '') sourcelist.append((fn, fn)) @@ -132,25 +132,25 @@ class InstallImage(Screen, ConfigListScreen): sourcelist = [('None', 'None')] self.source = ConfigSelection(choices=sourcelist) self.target = ConfigText(fixed_size=False) - self.stopenigma = ConfigYesNo(default=False) + self.stopenigma = ConfigYesNo(default=False) self.CopyFiles = ConfigYesNo(default=True) - if fileExists('/proc/stb/info/vumodel') and not fileExists('/proc/stb/info/boxtype'): + if fileExists('/proc/stb/info/vumodel') and not fileExists('/proc/stb/info/boxtype'): self.CopyKernel = ConfigYesNo(default=True) - else: - self.CopyKernel = ConfigYesNo(default=False) - self.TvList = ConfigYesNo(default=False) + else: + self.CopyKernel = ConfigYesNo(default=False) + self.TvList = ConfigYesNo(default=False) self.LanWlan = ConfigYesNo(default=False) if fileExists('/proc/stb/info/vumodel') and not fileExists('/proc/stb/info/boxtype'): - self.Sterowniki = ConfigYesNo(default=False) + self.Sterowniki = ConfigYesNo(default=False) else: - self.Sterowniki = ConfigYesNo(default=True) - self.InstallSettings = ConfigYesNo(default=False) - self.ZipDelete = ConfigYesNo(default=False) + self.Sterowniki = ConfigYesNo(default=True) + self.InstallSettings = ConfigYesNo(default=False) + self.ZipDelete = ConfigYesNo(default=False) self.RepairFTP = ConfigYesNo(default=False) self.SoftCam = ConfigYesNo(default=False) - self.MediaPortal = ConfigYesNo(default=False) + self.MediaPortal = ConfigYesNo(default=False) self.PiconR = ConfigYesNo(default=False) - self.Kodi = ConfigYesNo(default=False) + self.Kodi = ConfigYesNo(default=False) self.BlackHole = ConfigYesNo(default=False) self.target.value = '' self.curselimage = '' @@ -171,36 +171,36 @@ class InstallImage(Screen, ConfigListScreen): 'red': self.cancel, 'green': self.imageInstall, 'yellow': self.HelpInstall, - 'blue': self.openKeyboard}, -2) + 'blue': self.openKeyboard}, -2) self['key_green'] = Label(_('Install')) self['key_red'] = Label(_('Cancel')) self['key_yellow'] = Label(_('Help')) - self['key_blue'] = Label(_('Keyboard')) + self['key_blue'] = Label(_('Keyboard')) self['HelpWindow'] = Pixmap() self['HelpWindow'].hide() def createSetup(self): self.list = [] self.list.append(getConfigListEntry(_('Source Image file'), self.source)) - self.list.append(getConfigListEntry(_('Image Name'), self.target)) - self.list.append(getConfigListEntry(_('Stop E2 processes during installation?'), self.stopenigma)) - self.list.append(getConfigListEntry(_('Copy files from Flash to the installed image ?'), self.CopyFiles)) - self.list.append(getConfigListEntry(_('Copy the kernel of the installed system (recommended ?'), self.CopyKernel)) - self.list.append(getConfigListEntry(_('Copy the channel list ?'), self.TvList)) - self.list.append(getConfigListEntry(_('Copy network settings LAN-WLAN ?'), self.LanWlan)) - self.list.append(getConfigListEntry(_('Copy the drivers ? (Recommended only other image.)'), self.Sterowniki)) - self.list.append(getConfigListEntry(_('Copy Settings to the new Image'), self.InstallSettings)) - self.list.append(getConfigListEntry(_('Delete Image zip after Install ?'), self.ZipDelete)) + self.list.append(getConfigListEntry(_('Image Name'), self.target)) + self.list.append(getConfigListEntry(_('Stop E2 processes during installation?'), self.stopenigma)) + self.list.append(getConfigListEntry(_('Copy files from Flash to the installed image ?'), self.CopyFiles)) + self.list.append(getConfigListEntry(_('Copy the kernel of the installed system (recommended ?'), self.CopyKernel)) + self.list.append(getConfigListEntry(_('Copy the channel list ?'), self.TvList)) + self.list.append(getConfigListEntry(_('Copy network settings LAN-WLAN ?'), self.LanWlan)) + self.list.append(getConfigListEntry(_('Copy the drivers ? (Recommended only other image.)'), self.Sterowniki)) + self.list.append(getConfigListEntry(_('Copy Settings to the new Image'), self.InstallSettings)) + self.list.append(getConfigListEntry(_('Delete Image zip after Install ?'), self.ZipDelete)) self.list.append(getConfigListEntry(_('Repair FTP ? (Recommended only other image if it does not work.)'), self.RepairFTP)) - self.list.append(getConfigListEntry(_('Copy config SoftCam ?'), self.SoftCam)) - self.list.append(getConfigListEntry(_('Copy MediaPortal ?'), self.MediaPortal)) - self.list.append(getConfigListEntry(_('Copy picon flash to image install ?'), self.PiconR)) + self.list.append(getConfigListEntry(_('Copy config SoftCam ?'), self.SoftCam)) + self.list.append(getConfigListEntry(_('Copy MediaPortal ?'), self.MediaPortal)) + self.list.append(getConfigListEntry(_('Copy picon flash to image install ?'), self.PiconR)) self.list.append(getConfigListEntry(_('Transfer kodi settings ?'), self.Kodi)) self.list.append(getConfigListEntry(_('Path BlackHole ? (Not recommended for VuPlus)'), self.BlackHole)) - + def HelpInstall(self): self.session.open(HelpInstall) - + def typeChange(self, value): self.createSetup() self['config'].l.setList(self.list) @@ -252,26 +252,26 @@ class InstallImage(Screen, ConfigListScreen): message += _('NeoBot started installing new image.\n') message += _('The installation process may take a few minutes.\n') message += _('Please: DO NOT reboot your STB and turn off the power.\n') - message += _('Please, wait...\n') + message += _('Please, wait...\n') message += "'" cmd1 = 'python ' + pluginpath + '/ex_init.py' cmd = '%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s ' % (cmd1, source, target.replace(' ', '.'), - str(self.stopenigma.value), - str(self.CopyFiles.value), - str(self.CopyKernel.value), - str(self.TvList.value), - str(self.LanWlan.value), - str(self.Sterowniki.value), - str(self.InstallSettings.value), - str(self.ZipDelete.value), - str(self.RepairFTP.value), - str(self.SoftCam.value), - str(self.MediaPortal.value), - str(self.PiconR.value), - str(self.Kodi.value), - str(self.BlackHole.value)) + str(self.stopenigma.value), + str(self.CopyFiles.value), + str(self.CopyKernel.value), + str(self.TvList.value), + str(self.LanWlan.value), + str(self.Sterowniki.value), + str(self.InstallSettings.value), + str(self.ZipDelete.value), + str(self.RepairFTP.value), + str(self.SoftCam.value), + str(self.MediaPortal.value), + str(self.PiconR.value), + str(self.Kodi.value), + str(self.BlackHole.value)) print("[MULTI-BOOT]: "), cmd from Plugins.Extensions.NeoBoot.plugin import PLUGINVERSION self.session.open(Console, _('NeoBoot v.%s - Install new image') % PLUGINVERSION, [message, cmd]) @@ -306,49 +306,48 @@ class HelpInstall(Screen): self.updatetext() def updatetext(self): - + message = _('Source Image file') - message += _(' - Select the software to be installed with the cursor (left or right).\n\n') - + message += _(' - Select the software to be installed with the cursor (left or right).\n\n') + message += _('Image Name') - message += _(' - to change, press blue on the remote control.\n\n') - + message += _(' - to change, press blue on the remote control.\n\n') + message += _('Copy files from Flash to the installed image ?') - message += _(' - this checking this option on it nothing will be copied from the image flash to the installed image in neoboot.\n\n') - + message += _(' - this checking this option on it nothing will be copied from the image flash to the installed image in neoboot.\n\n') + message += _('Copy the kernel of the installed system (recommended ?') message += _('- after selecting this option, the kernel of the installed image will be copied to neoboot, only recommended for STB vuplus\n\n') - + message += _('Copy the channel list ?') message += _(' - Option to copy channel list from flash to image installed in neoboot.\n\n') - + message += _('Copy mounting disks ? (Recommended)') message += _(' - the option transfers mounts to the image installed in neoboot from the flashlight, recommended only if you are installing an image from a different model than you have.\n\n') - + message += _('Copy network settings LAN-WLAN ?') message += _(' - the option moves files with the settings for lan and wlan.\n\n') - - message += _('Copy the drivers ? (Recommended only other image.)') - message += _(' - Option to copy drivers to the image installed in neoboot from the flashlight, recommended only if you are installing an image from a different model than you have.\n\n') - + + message += _('Copy the drivers ? (Recommended only other image.)') + message += _(' - Option to copy drivers to the image installed in neoboot from the flashlight, recommended only if you are installing an image from a different model than you have.\n\n') + message += _('Copy Settings to the new Image') message += _(' - the option copies the software settings from the flashlight to the system being installed in the neobot.\n\n') - + message += _('Delete Image zip after Install ?') message += _(' - po instalacji, opcja kasuje plik zip image z katalogu ImagesUpload.\n\n') - + message += _('Repair FTP ? (Recommended only other image if it does not work.)') message += _(' - the option in some cases repairs the File Transfer Protocol connection in the installed image.\n\n') - + message += _('Copy config SoftCam ?') message += _(' - the option copies oscam configi and cccam, openpli default.\n\n') - - message += _('Copy picon flash to image install ?') + + message += _('Copy picon flash to image install ?') message += _(' - cpuy picon from flash to image install in neoboot\n\n') - - message += _('Path BlackHole ? (Not recommended for VuPlus)') + + message += _('Path BlackHole ? (Not recommended for VuPlus)') message += _(' - option for image blackhole, helps to run BH in neoboot\n\n') - + self['lab1'].show() self['lab1'].setText(message) - diff --git a/NeoBoot/usedskin.py b/NeoBoot/usedskin.py index f0915bf..b432ecd 100644 --- a/NeoBoot/usedskin.py +++ b/NeoBoot/usedskin.py @@ -4,23 +4,23 @@ from Screens.Screen import Screen from Components.Pixmap import Pixmap import os -#Colors (#AARRGGBB) +#Colors (#AARRGGBB) #____Recommended colors - Zalecane kolory : -#color name="white" value="#ffffff" -#color name="darkwhite" value="#00dddddd" -#color name="red" value="#f23d21" -#color name="green" value="#389416" -#color name="blue" value="#0064c7" -#color name="yellow" value="#bab329" -#color name="orange" value="#00ffa500" -#color name="gray" value="#808080" -#color name="lightgrey" value="#009b9b9b" +#color name="white" value="#ffffff" +#color name="darkwhite" value="#00dddddd" +#color name="red" value="#f23d21" +#color name="green" value="#389416" +#color name="blue" value="#0064c7" +#color name="yellow" value="#bab329" +#color name="orange" value="#00ffa500" +#color name="gray" value="#808080" +#color name="lightgrey" value="#009b9b9b" # green = '#00389416' lub #00389416 # red = '#00ff2525' # yellow = '#00ffe875' # orange = '#00ff7f50' # seledynowy = #00FF00 -# jasny-blue = #99FFFF +# jasny-blue = #99FFFF # Zamiast font=Regular ktory nie rozpoznaje polskich znakow np. na VTi, mozesz zmienic na ponizsze font="*: # font - genel @@ -28,15 +28,15 @@ import os # font - tasat # font - dugme -# +# ###____ Skin Ultra HD - ImageChooseFULLHD ___ mod. gutosie___ -ImageChooseFULLHD = """ +ImageChooseFULLHD = """ - - - + + + @@ -55,10 +55,10 @@ ImageChooseFULLHD = """ - - - - + + + + @@ -90,60 +90,60 @@ ImageChooseFULLHD = """ ###____ Skin Ultra HD - ImageChooseULTRAHD ___ mod. gutosie___ ImageChooseULTRAHD = """ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - Default + Default - Format:%A + Format:%A Format:%e. %b. - + """ ###____ Skin HD - ImageChoose ___mod. gutosie ___ ImageChooseHD = """ - - - - - + + + + + @@ -161,7 +161,7 @@ ImageChooseHD = """ - + @@ -179,7 +179,7 @@ ImageChooseHD = """ Format:%-H:%M - + """ @@ -205,20 +205,20 @@ MyUpgradeFULLHD = """ ###____ Skin UltraHD - MyUpgradeUltraHD ___mod. gutosie ___ MyUpgradeUltraHD = """ - - - - + + + + {"template": [MultiContentEntryText(pos=(0,0), size=(1680,132), flags=RT_HALIGN_CENTER|RT_VALIGN_CENTER, text=0)], "fonts": [gFont("Regular",66)], "itemHeight":132}\n - - - - - - + + + + + + """ - + ###____ Skin MyUpgradeHD - MyUpgradeHD ___mod. gutosie ___ MyUpgradeHD = """ @@ -236,9 +236,9 @@ MyUpgradeHD = """ - """ - - + """ + + ###____ Skin NeoBootInstallationFULLHD - NeoBootInstallationFULLHD ___mod. gutosie ___ NeoBootInstallationFULLHD = """ @@ -263,31 +263,31 @@ NeoBootInstallationFULLHD = """ ###____ Skin NeoBootInstallationUltraHD - NeoBootInstallationUltraHD ___mod. gutosie ___ NeoBootInstallationUltraHD = """ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + Default - + Format:%A - + Format:%e. %b. """ @@ -300,20 +300,13 @@ NeoBootInstallationHD = """ - - - - - - - - + + + + + + + + """ - - - - - - -