mirror of
				https://github.com/gutosie/neoboot.git
				synced 2025-11-03 20:55:47 +01:00 
			
		
		
		
	add novaler4kpro support
This commit is contained in:
		@@ -1,6 +1,6 @@
 | 
				
			|||||||
# -*- coding: utf-8 -*-
 | 
					# -*- coding: utf-8 -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from __future__ import print_function
 | 
					
 | 
				
			||||||
from Components.Language import language
 | 
					from Components.Language import language
 | 
				
			||||||
from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_LANGUAGE
 | 
					from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_LANGUAGE
 | 
				
			||||||
import os
 | 
					import os
 | 
				
			||||||
@@ -13,7 +13,8 @@ def localeInit():
 | 
				
			|||||||
    lang = language.getLanguage()[:2]
 | 
					    lang = language.getLanguage()[:2]
 | 
				
			||||||
    os.environ['LANGUAGE'] = lang
 | 
					    os.environ['LANGUAGE'] = lang
 | 
				
			||||||
    print("[NeoBoot] set language to "), lang
 | 
					    print("[NeoBoot] set language to "), lang
 | 
				
			||||||
    gettext.bindtextdomain(PluginLanguageDomain, resolveFilename(SCOPE_PLUGINS, PluginLanguagePath))
 | 
					    gettext.bindtextdomain(PluginLanguageDomain, resolveFilename(
 | 
				
			||||||
 | 
					        SCOPE_PLUGINS, PluginLanguagePath))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def _(txt):
 | 
					def _(txt):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,9 @@
 | 
				
			|||||||
#!/usr/bin/python
 | 
					#!/usr/bin/python
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import sys
 | 
					import sys
 | 
				
			||||||
import extract
 | 
					from . import extract
 | 
				
			||||||
if len(sys.argv) < 17:
 | 
					if len(sys.argv) < 17:
 | 
				
			||||||
    pass
 | 
					    pass
 | 
				
			||||||
else:
 | 
					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], sys.argv[17] )
 | 
					    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], sys.argv[17])
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										1129
									
								
								NeoBoot/extract.py
									
									
									
									
									
								
							
							
						
						
									
										1129
									
								
								NeoBoot/extract.py
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -7,7 +7,7 @@ from Tools.Directories import fileExists, pathExists
 | 
				
			|||||||
from Tools.CList import CList
 | 
					from Tools.CList import CList
 | 
				
			||||||
from Components.SystemInfo import SystemInfo
 | 
					from Components.SystemInfo import SystemInfo
 | 
				
			||||||
from Components.Console import Console
 | 
					from Components.Console import Console
 | 
				
			||||||
#from Plugins.Extensions.NeoBoot.files import Task
 | 
					# from Plugins.Extensions.NeoBoot.files import Task
 | 
				
			||||||
if fileExists('/usr/lib/python2.7'):
 | 
					if fileExists('/usr/lib/python2.7'):
 | 
				
			||||||
    from Plugins.Extensions.NeoBoot.files import Task
 | 
					    from Plugins.Extensions.NeoBoot.files import Task
 | 
				
			||||||
else:
 | 
					else:
 | 
				
			||||||
@@ -35,7 +35,7 @@ def getProcMounts():
 | 
				
			|||||||
    try:
 | 
					    try:
 | 
				
			||||||
        mounts = open('/proc/mounts', 'r')
 | 
					        mounts = open('/proc/mounts', 'r')
 | 
				
			||||||
    except IOError as ex:
 | 
					    except IOError as ex:
 | 
				
			||||||
        print(("[Harddisk] Failed to open /proc/mounts"), ex)
 | 
					        print((("[Harddisk] Failed to open /proc/mounts"), ex))
 | 
				
			||||||
        return []
 | 
					        return []
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    result = [line.strip().split(' ') for line in mounts]
 | 
					    result = [line.strip().split(' ') for line in mounts]
 | 
				
			||||||
@@ -57,7 +57,7 @@ def isFileSystemSupported(filesystem):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        return False
 | 
					        return False
 | 
				
			||||||
    except Exception as ex:
 | 
					    except Exception as ex:
 | 
				
			||||||
        print(("[Harddisk] Failed to read /proc/filesystems:'"), ex)
 | 
					        print((("[Harddisk] Failed to read /proc/filesystems:'"), ex))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def findMountPoint(path):
 | 
					def findMountPoint(path):
 | 
				
			||||||
@@ -98,7 +98,8 @@ class Harddisk():
 | 
				
			|||||||
        self.removable = removable
 | 
					        self.removable = removable
 | 
				
			||||||
        self.internal = 'pci' in self.phys_path or 'ahci' in self.phys_path or 'sata' in self.phys_path
 | 
					        self.internal = 'pci' in self.phys_path or 'ahci' in self.phys_path or 'sata' in self.phys_path
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            data = open('/sys/block/%s/queue/rotational' % device, 'r').read().strip()
 | 
					            data = open('/sys/block/%s/queue/rotational' %
 | 
				
			||||||
 | 
					                        device, 'r').read().strip()
 | 
				
			||||||
            self.rotational = int(data)
 | 
					            self.rotational = int(data)
 | 
				
			||||||
        except:
 | 
					        except:
 | 
				
			||||||
            self.rotational = True
 | 
					            self.rotational = True
 | 
				
			||||||
@@ -125,7 +126,8 @@ class Harddisk():
 | 
				
			|||||||
                    break
 | 
					                    break
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            self.card = self.device[:2] == 'hd' and 'host0' not in self.dev_path
 | 
					            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:
 | 
					        if not removable and not self.card:
 | 
				
			||||||
            self.startIdle()
 | 
					            self.startIdle()
 | 
				
			||||||
        return
 | 
					        return
 | 
				
			||||||
@@ -201,9 +203,9 @@ class Harddisk():
 | 
				
			|||||||
                return vendor + '(' + model + ')'
 | 
					                return vendor + '(' + model + ')'
 | 
				
			||||||
            if self.device.startswith('mmcblk0'):
 | 
					            if self.device.startswith('mmcblk0'):
 | 
				
			||||||
                return readFile(self.sysfsPath('device/name'))
 | 
					                return readFile(self.sysfsPath('device/name'))
 | 
				
			||||||
            raise (Exception, ("[Harddisk] no hdX or sdX or mmcX"))
 | 
					            raise Exception
 | 
				
			||||||
        except Exception as e:
 | 
					        except Exception as e:
 | 
				
			||||||
            print("[Harddisk] Failed to get model:"), e
 | 
					            print(("[Harddisk] Failed to get model:"), e)
 | 
				
			||||||
            return '-?-'
 | 
					            return '-?-'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def free(self):
 | 
					    def free(self):
 | 
				
			||||||
@@ -269,7 +271,7 @@ class Harddisk():
 | 
				
			|||||||
            return 0
 | 
					            return 0
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            cmd = 'umount ' + dev
 | 
					            cmd = 'umount ' + dev
 | 
				
			||||||
            print("[Harddisk]"), cmd
 | 
					            print(("[Harddisk]"), cmd)
 | 
				
			||||||
            res = os.system(cmd)
 | 
					            res = os.system(cmd)
 | 
				
			||||||
            return res >> 8
 | 
					            return res >> 8
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -297,7 +299,7 @@ class Harddisk():
 | 
				
			|||||||
            parts = line.strip().split(' ')
 | 
					            parts = line.strip().split(' ')
 | 
				
			||||||
            fspath = os.path.realpath(parts[0])
 | 
					            fspath = os.path.realpath(parts[0])
 | 
				
			||||||
            if fspath == dev:
 | 
					            if fspath == dev:
 | 
				
			||||||
                print("[Harddisk] mounting:"), fspath
 | 
					                print(("[Harddisk] mounting:"), fspath)
 | 
				
			||||||
                cmd = 'mount -t auto ' + fspath
 | 
					                cmd = 'mount -t auto ' + fspath
 | 
				
			||||||
                res = os.system(cmd)
 | 
					                res = os.system(cmd)
 | 
				
			||||||
                return res >> 8
 | 
					                return res >> 8
 | 
				
			||||||
@@ -332,7 +334,7 @@ class Harddisk():
 | 
				
			|||||||
    def createInitializeJob(self):
 | 
					    def createInitializeJob(self):
 | 
				
			||||||
        job = Task.Job(_('Initializing storage device...'))
 | 
					        job = Task.Job(_('Initializing storage device...'))
 | 
				
			||||||
        size = self.diskSize()
 | 
					        size = self.diskSize()
 | 
				
			||||||
        print("[HD] size: %s MB") % size
 | 
					        print(("[HD] size: %s MB") % size)
 | 
				
			||||||
        task = UnmountTask(job, self)
 | 
					        task = UnmountTask(job, self)
 | 
				
			||||||
        task = Task.PythonTask(job, _('Removing partition table'))
 | 
					        task = Task.PythonTask(job, _('Removing partition table'))
 | 
				
			||||||
        task.work = self.killPartitionTable
 | 
					        task.work = self.killPartitionTable
 | 
				
			||||||
@@ -342,7 +344,8 @@ class Harddisk():
 | 
				
			|||||||
        task.setTool('hdparm')
 | 
					        task.setTool('hdparm')
 | 
				
			||||||
        task.args.append('-z')
 | 
					        task.args.append('-z')
 | 
				
			||||||
        task.args.append(self.disk_path)
 | 
					        task.args.append(self.disk_path)
 | 
				
			||||||
        task = Task.ConditionTask(job, _('Waiting for partition'), timeoutCount=20)
 | 
					        task = Task.ConditionTask(
 | 
				
			||||||
 | 
					            job, _('Waiting for partition'), timeoutCount=20)
 | 
				
			||||||
        task.check = lambda: not os.path.exists(self.partitionPath('1'))
 | 
					        task.check = lambda: not os.path.exists(self.partitionPath('1'))
 | 
				
			||||||
        task.weighting = 1
 | 
					        task.weighting = 1
 | 
				
			||||||
        if os.path.exists('/usr/sbin/parted'):
 | 
					        if os.path.exists('/usr/sbin/parted'):
 | 
				
			||||||
@@ -390,7 +393,7 @@ class Harddisk():
 | 
				
			|||||||
        task = MkfsTask(job, _('Creating filesystem'))
 | 
					        task = MkfsTask(job, _('Creating filesystem'))
 | 
				
			||||||
        big_o_options = ['dir_index']
 | 
					        big_o_options = ['dir_index']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###__blokada hash dla ext4 >>>
 | 
					# __blokada hash dla ext4 >>>
 | 
				
			||||||
#        if isFileSystemSupported('ext4'):
 | 
					#        if isFileSystemSupported('ext4'):
 | 
				
			||||||
#            task.setTool('mkfs.ext4')
 | 
					#            task.setTool('mkfs.ext4')
 | 
				
			||||||
#            if size > 20000:
 | 
					#            if size > 20000:
 | 
				
			||||||
@@ -626,13 +629,15 @@ class HarddiskManager():
 | 
				
			|||||||
             ('/media/usb1', _('USB1 stick')),
 | 
					             ('/media/usb1', _('USB1 stick')),
 | 
				
			||||||
             ('/media/usb2', _('USB2 stick')),
 | 
					             ('/media/usb2', _('USB2 stick')),
 | 
				
			||||||
             ('/', _('Internal flash')))
 | 
					             ('/', _('Internal flash')))
 | 
				
			||||||
        known = set([os.path.normpath(a.mountpoint) for a in self.partitions if a.mountpoint])
 | 
					        known = set([os.path.normpath(a.mountpoint)
 | 
				
			||||||
 | 
					                    for a in self.partitions if a.mountpoint])
 | 
				
			||||||
        for m, d in p:
 | 
					        for m, d in p:
 | 
				
			||||||
            if m not in known and os.path.ismount(m):
 | 
					            if m not in known and os.path.ismount(m):
 | 
				
			||||||
                self.partitions.append(Partition(mountpoint=m, description=d))
 | 
					                self.partitions.append(Partition(mountpoint=m, description=d))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def getBlockDevInfo(self, blockdev):
 | 
					    def getBlockDevInfo(self, blockdev):
 | 
				
			||||||
        HasMMC = fileExists('/proc/cmdline') and 'root=/dev/mmcblk' in open('/proc/cmdline', 'r').read()
 | 
					        HasMMC = fileExists(
 | 
				
			||||||
 | 
					            '/proc/cmdline') and 'root=/dev/mmcblk' in open('/proc/cmdline', 'r').read()
 | 
				
			||||||
        devpath = '/sys/block/' + blockdev
 | 
					        devpath = '/sys/block/' + blockdev
 | 
				
			||||||
        error = False
 | 
					        error = False
 | 
				
			||||||
        removable = False
 | 
					        removable = False
 | 
				
			||||||
@@ -689,7 +694,8 @@ class HarddiskManager():
 | 
				
			|||||||
    def enumerateBlockDevices(self):
 | 
					    def enumerateBlockDevices(self):
 | 
				
			||||||
        print("[Harddisk] enumerating block devices...")
 | 
					        print("[Harddisk] enumerating block devices...")
 | 
				
			||||||
        for blockdev in os.listdir('/sys/block'):
 | 
					        for blockdev in os.listdir('/sys/block'):
 | 
				
			||||||
            error, blacklisted, removable, is_cdrom, partitions, medium_found = self.addHotplugPartition(blockdev)
 | 
					            error, blacklisted, removable, is_cdrom, partitions, medium_found = self.addHotplugPartition(
 | 
				
			||||||
 | 
					                blockdev)
 | 
				
			||||||
            if not error and not blacklisted and medium_found:
 | 
					            if not error and not blacklisted and medium_found:
 | 
				
			||||||
                for part in partitions:
 | 
					                for part in partitions:
 | 
				
			||||||
                    self.addHotplugPartition(part)
 | 
					                    self.addHotplugPartition(part)
 | 
				
			||||||
@@ -721,12 +727,14 @@ class HarddiskManager():
 | 
				
			|||||||
                physdev = os.path.realpath('/sys/block/' + dev + '/device')[4:]
 | 
					                physdev = os.path.realpath('/sys/block/' + dev + '/device')[4:]
 | 
				
			||||||
            except OSError:
 | 
					            except OSError:
 | 
				
			||||||
                physdev = dev
 | 
					                physdev = dev
 | 
				
			||||||
                print(("couldn't determine blockdev physdev for device"), device)
 | 
					                print((("couldn't determine blockdev physdev for device"), device))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        error, blacklisted, removable, is_cdrom, partitions, medium_found = self.getBlockDevInfo(device)
 | 
					        error, blacklisted, removable, is_cdrom, partitions, medium_found = self.getBlockDevInfo(
 | 
				
			||||||
 | 
					            device)
 | 
				
			||||||
        if not blacklisted and medium_found:
 | 
					        if not blacklisted and medium_found:
 | 
				
			||||||
            description = self.getUserfriendlyDeviceName(device, physdev)
 | 
					            description = self.getUserfriendlyDeviceName(device, physdev)
 | 
				
			||||||
            p = Partition(mountpoint=self.getMountpoint(device), description=description, force_mounted=True, device=device)
 | 
					            p = Partition(mountpoint=self.getMountpoint(
 | 
				
			||||||
 | 
					                device), description=description, force_mounted=True, device=device)
 | 
				
			||||||
            self.partitions.append(p)
 | 
					            self.partitions.append(p)
 | 
				
			||||||
            if p.mountpoint:
 | 
					            if p.mountpoint:
 | 
				
			||||||
                self.on_partition_list_change('add', p)
 | 
					                self.on_partition_list_change('add', p)
 | 
				
			||||||
@@ -749,12 +757,14 @@ class HarddiskManager():
 | 
				
			|||||||
                physdev = os.path.realpath('/sys/block/' + dev + '/device')[4:]
 | 
					                physdev = os.path.realpath('/sys/block/' + dev + '/device')[4:]
 | 
				
			||||||
            except OSError:
 | 
					            except OSError:
 | 
				
			||||||
                physdev = dev
 | 
					                physdev = dev
 | 
				
			||||||
                print(("couldn't determine blockdev physdev for device"), device)
 | 
					                print((("couldn't determine blockdev physdev for device"), device))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        error, blacklisted, removable, is_cdrom, partitions, medium_found = self.getBlockDevInfo(device)
 | 
					        error, blacklisted, removable, is_cdrom, partitions, medium_found = self.getBlockDevInfo(
 | 
				
			||||||
 | 
					            device)
 | 
				
			||||||
        if not blacklisted and medium_found:
 | 
					        if not blacklisted and medium_found:
 | 
				
			||||||
            description = self.getUserfriendlyDeviceName(device, physdev)
 | 
					            description = self.getUserfriendlyDeviceName(device, physdev)
 | 
				
			||||||
            p = Partition(mountpoint='/media/audiocd', description=description, force_mounted=True, device=device)
 | 
					            p = Partition(mountpoint='/media/audiocd',
 | 
				
			||||||
 | 
					                          description=description, force_mounted=True, device=device)
 | 
				
			||||||
            self.partitions.append(p)
 | 
					            self.partitions.append(p)
 | 
				
			||||||
            self.on_partition_list_change('add', p)
 | 
					            self.on_partition_list_change('add', p)
 | 
				
			||||||
            SystemInfo['Harddisk'] = False
 | 
					            SystemInfo['Harddisk'] = False
 | 
				
			||||||
@@ -802,7 +812,8 @@ class HarddiskManager():
 | 
				
			|||||||
    def getMountedPartitions(self, onlyhotplug=False, mounts=None):
 | 
					    def getMountedPartitions(self, onlyhotplug=False, mounts=None):
 | 
				
			||||||
        if mounts is None:
 | 
					        if mounts is None:
 | 
				
			||||||
            mounts = getProcMounts()
 | 
					            mounts = getProcMounts()
 | 
				
			||||||
        parts = [x for x in self.partitions if (x.is_hotplug or not onlyhotplug) and x.mounted(mounts)]
 | 
					        parts = [x for x in self.partitions if (
 | 
				
			||||||
 | 
					            x.is_hotplug or not onlyhotplug) and x.mounted(mounts)]
 | 
				
			||||||
        devs = set([x.device for x in parts])
 | 
					        devs = set([x.device for x in parts])
 | 
				
			||||||
        for devname in devs.copy():
 | 
					        for devname in devs.copy():
 | 
				
			||||||
            if not devname:
 | 
					            if not devname:
 | 
				
			||||||
@@ -828,7 +839,7 @@ class HarddiskManager():
 | 
				
			|||||||
        try:
 | 
					        try:
 | 
				
			||||||
            description = readFile('/sys' + phys + '/model')
 | 
					            description = readFile('/sys' + phys + '/model')
 | 
				
			||||||
        except IOError as s:
 | 
					        except IOError as s:
 | 
				
			||||||
            print(("couldn't read model: "), s)
 | 
					            print((("couldn't read model: "), s))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if part and part != 1:
 | 
					        if part and part != 1:
 | 
				
			||||||
            description += _(' (Partition %d)') % part
 | 
					            description += _(' (Partition %d)') % part
 | 
				
			||||||
@@ -857,7 +868,8 @@ class HarddiskManager():
 | 
				
			|||||||
            ioctl(cd.fileno(), ioctl_flag, speed)
 | 
					            ioctl(cd.fileno(), ioctl_flag, speed)
 | 
				
			||||||
            cd.close()
 | 
					            cd.close()
 | 
				
			||||||
        except Exception as ex:
 | 
					        except Exception as ex:
 | 
				
			||||||
            print("[Harddisk] Failed to set %s speed to %s") % (device, speed), ex
 | 
					            print(("[Harddisk] Failed to set %s speed to %s") %
 | 
				
			||||||
 | 
					                  (device, speed), ex)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class UnmountTask(Task.LoggingTask):
 | 
					class UnmountTask(Task.LoggingTask):
 | 
				
			||||||
@@ -872,7 +884,7 @@ class UnmountTask(Task.LoggingTask):
 | 
				
			|||||||
            dev = self.hdd.disk_path.split('/')[-1]
 | 
					            dev = self.hdd.disk_path.split('/')[-1]
 | 
				
			||||||
            open('/dev/nomount.%s' % dev, 'wb').close()
 | 
					            open('/dev/nomount.%s' % dev, 'wb').close()
 | 
				
			||||||
        except Exception as e:
 | 
					        except Exception as e:
 | 
				
			||||||
            print("ERROR: Failed to create /dev/nomount file:"), e
 | 
					            print(("ERROR: Failed to create /dev/nomount file:"), e)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.setTool('umount')
 | 
					        self.setTool('umount')
 | 
				
			||||||
        self.args.append('-f')
 | 
					        self.args.append('-f')
 | 
				
			||||||
@@ -891,7 +903,7 @@ class UnmountTask(Task.LoggingTask):
 | 
				
			|||||||
            try:
 | 
					            try:
 | 
				
			||||||
                os.rmdir(path)
 | 
					                os.rmdir(path)
 | 
				
			||||||
            except Exception as ex:
 | 
					            except Exception as ex:
 | 
				
			||||||
                print("Failed to remove path '%s':") % path, ex
 | 
					                print(("Failed to remove path '%s':") % path, ex)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class MountTask(Task.LoggingTask):
 | 
					class MountTask(Task.LoggingTask):
 | 
				
			||||||
@@ -905,7 +917,7 @@ class MountTask(Task.LoggingTask):
 | 
				
			|||||||
            dev = self.hdd.disk_path.split('/')[-1]
 | 
					            dev = self.hdd.disk_path.split('/')[-1]
 | 
				
			||||||
            os.unlink('/dev/nomount.%s' % dev)
 | 
					            os.unlink('/dev/nomount.%s' % dev)
 | 
				
			||||||
        except Exception as e:
 | 
					        except Exception as e:
 | 
				
			||||||
            print("ERROR: Failed to remove /dev/nomount file:"), e
 | 
					            print(("ERROR: Failed to remove /dev/nomount file:"), e)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if self.hdd.mount_device is None:
 | 
					        if self.hdd.mount_device is None:
 | 
				
			||||||
            dev = self.hdd.partitionPath('1')
 | 
					            dev = self.hdd.partitionPath('1')
 | 
				
			||||||
@@ -935,7 +947,7 @@ class MkfsTask(Task.LoggingTask):
 | 
				
			|||||||
        return
 | 
					        return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def processOutput(self, data):
 | 
					    def processOutput(self, data):
 | 
				
			||||||
        print("[Mkfs]"), data
 | 
					        print(("[Mkfs]"), data)
 | 
				
			||||||
        if 'Writing inode tables:' in data:
 | 
					        if 'Writing inode tables:' in data:
 | 
				
			||||||
            self.fsck_state = 'inode'
 | 
					            self.fsck_state = 'inode'
 | 
				
			||||||
        elif 'Creating journal' in data:
 | 
					        elif 'Creating journal' in data:
 | 
				
			||||||
@@ -951,13 +963,13 @@ class MkfsTask(Task.LoggingTask):
 | 
				
			|||||||
                        d[1] = d[1].split('\x08', 1)[0]
 | 
					                        d[1] = d[1].split('\x08', 1)[0]
 | 
				
			||||||
                    self.setProgress(80 * int(d[0]) / int(d[1]))
 | 
					                    self.setProgress(80 * int(d[0]) / int(d[1]))
 | 
				
			||||||
                except Exception as e:
 | 
					                except Exception as e:
 | 
				
			||||||
                    print("[Mkfs] E:"), e
 | 
					                    print(("[Mkfs] E:"), e)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                return
 | 
					                return
 | 
				
			||||||
        self.log.append(data)
 | 
					        self.log.append(data)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###########################__From HarddiskSetup_################################
 | 
					########################### __From HarddiskSetup_################################
 | 
				
			||||||
class HarddiskSetup(Screen):
 | 
					class HarddiskSetup(Screen):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, session, hdd, action, text, question):
 | 
					    def __init__(self, session, hdd, action, text, question):
 | 
				
			||||||
@@ -976,14 +988,15 @@ class HarddiskSetup(Screen):
 | 
				
			|||||||
                                                            'green': self.hddQuestion})
 | 
					                                                            'green': self.hddQuestion})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def hddQuestion(self):
 | 
					    def hddQuestion(self):
 | 
				
			||||||
        message = self.question + '\n' + _('You can continue watching TV etc. while this is running.')
 | 
					        message = self.question + '\n' + \
 | 
				
			||||||
 | 
					            _('You can continue watching TV etc. while this is running.')
 | 
				
			||||||
        self.session.openWithCallback(self.hddConfirmed, MessageBox, message)
 | 
					        self.session.openWithCallback(self.hddConfirmed, MessageBox, message)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def hddConfirmed(self, confirmed):
 | 
					    def hddConfirmed(self, confirmed):
 | 
				
			||||||
        if not confirmed:
 | 
					        if not confirmed:
 | 
				
			||||||
            return
 | 
					            return
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            from Task import job_manager
 | 
					            from .Task import job_manager
 | 
				
			||||||
        except:
 | 
					        except:
 | 
				
			||||||
            from Components.Task import job_manager
 | 
					            from Components.Task import job_manager
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
@@ -992,7 +1005,8 @@ class HarddiskSetup(Screen):
 | 
				
			|||||||
            from Screens.TaskView import JobView
 | 
					            from Screens.TaskView import JobView
 | 
				
			||||||
            self.session.open(JobView, job, afterEventChangeable=False)
 | 
					            self.session.open(JobView, job, afterEventChangeable=False)
 | 
				
			||||||
        except Exception as ex:
 | 
					        except Exception as ex:
 | 
				
			||||||
            self.session.open(MessageBox, str(ex), type=MessageBox.TYPE_ERROR, timeout=10)
 | 
					            self.session.open(MessageBox, str(
 | 
				
			||||||
 | 
					                ex), type=MessageBox.TYPE_ERROR, timeout=10)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.close()
 | 
					        self.close()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1016,7 +1030,8 @@ class HarddiskSelection(Screen):
 | 
				
			|||||||
                                                            'green': self.okbuttonClick})
 | 
					                                                            'green': self.okbuttonClick})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def doIt(self, selection):
 | 
					    def doIt(self, selection):
 | 
				
			||||||
        self.session.openWithCallback(self.close, HarddiskSetup, selection, action=selection.createInitializeJob, text=_('Initialize'), question=_('Do you really want to initialize the device?\nAll data on the disk will be lost!'))
 | 
					        self.session.openWithCallback(self.close, HarddiskSetup, selection, action=selection.createInitializeJob, text=_(
 | 
				
			||||||
 | 
					            'Initialize'), question=_('Do you really want to initialize the device?\nAll data on the disk will be lost!'))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def okbuttonClick(self):
 | 
					    def okbuttonClick(self):
 | 
				
			||||||
        selection = self['hddlist'].getCurrent()
 | 
					        selection = self['hddlist'].getCurrent()
 | 
				
			||||||
@@ -1027,8 +1042,9 @@ class HarddiskSelection(Screen):
 | 
				
			|||||||
class HarddiskFsckSelection(HarddiskSelection):
 | 
					class HarddiskFsckSelection(HarddiskSelection):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def doIt(self, selection):
 | 
					    def doIt(self, selection):
 | 
				
			||||||
        self.session.openWithCallback(self.close, HarddiskSetup, selection, action=selection.createCheckJob, text=_('Check'), question=_('Do you really want to check the filesystem?\nThis could take lots of time!'))
 | 
					        self.session.openWithCallback(self.close, HarddiskSetup, selection, action=selection.createCheckJob, text=_(
 | 
				
			||||||
###########################__end HarddiskSetup_################################
 | 
					            'Check'), question=_('Do you really want to check the filesystem?\nThis could take lots of time!'))
 | 
				
			||||||
 | 
					########################### __end HarddiskSetup_################################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
harddiskmanager = HarddiskManager()
 | 
					harddiskmanager = HarddiskManager()
 | 
				
			||||||
@@ -1058,4 +1074,5 @@ def internalHDDNotSleeping(external=False):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
harddiskmanager = HarddiskManager()
 | 
					harddiskmanager = HarddiskManager()
 | 
				
			||||||
SystemInfo['ext4'] = isFileSystemSupported('ext4') or isFileSystemSupported('ext3')
 | 
					SystemInfo['ext4'] = isFileSystemSupported(
 | 
				
			||||||
 | 
					    'ext4') or isFileSystemSupported('ext3')
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ from Tools.CList import CList
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class Job(object):
 | 
					class Job(object):
 | 
				
			||||||
    NOT_STARTED, IN_PROGRESS, FINISHED, FAILED = range(4)
 | 
					    NOT_STARTED, IN_PROGRESS, FINISHED, FAILED = list(range(4))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, name):
 | 
					    def __init__(self, name):
 | 
				
			||||||
        self.tasks = []
 | 
					        self.tasks = []
 | 
				
			||||||
@@ -33,7 +33,9 @@ class Job(object):
 | 
				
			|||||||
        if self.current_task == len(self.tasks):
 | 
					        if self.current_task == len(self.tasks):
 | 
				
			||||||
            return self.end
 | 
					            return self.end
 | 
				
			||||||
        t = self.tasks[self.current_task]
 | 
					        t = self.tasks[self.current_task]
 | 
				
			||||||
        jobprogress = t.weighting * t.progress / float(t.end) + sum([task.weighting for task in self.tasks[:self.current_task]])
 | 
					        jobprogress = t.weighting * t.progress / \
 | 
				
			||||||
 | 
					            float(t.end) + \
 | 
				
			||||||
 | 
					            sum([task.weighting for task in self.tasks[:self.current_task]])
 | 
				
			||||||
        return int(jobprogress * self.weightScale)
 | 
					        return int(jobprogress * self.weightScale)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    progress = property(getProgress)
 | 
					    progress = property(getProgress)
 | 
				
			||||||
@@ -71,7 +73,8 @@ class Job(object):
 | 
				
			|||||||
                self.callback(self, None, [])
 | 
					                self.callback(self, None, [])
 | 
				
			||||||
                self.callback = None
 | 
					                self.callback = None
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                print("still waiting for %d resident task(s) %s to finish") % (len(self.resident_tasks), str(self.resident_tasks))
 | 
					                print(("still waiting for %d resident task(s) %s to finish") %
 | 
				
			||||||
 | 
					                      (len(self.resident_tasks), str(self.resident_tasks)))
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            self.tasks[self.current_task].run(self.taskCallback)
 | 
					            self.tasks[self.current_task].run(self.taskCallback)
 | 
				
			||||||
            self.state_changed()
 | 
					            self.state_changed()
 | 
				
			||||||
@@ -82,18 +85,18 @@ class Job(object):
 | 
				
			|||||||
        if stay_resident:
 | 
					        if stay_resident:
 | 
				
			||||||
            if cb_idx not in self.resident_tasks:
 | 
					            if cb_idx not in self.resident_tasks:
 | 
				
			||||||
                self.resident_tasks.append(self.current_task)
 | 
					                self.resident_tasks.append(self.current_task)
 | 
				
			||||||
                print("task going resident:"), task
 | 
					                print(("task going resident:"), task)
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                print("task keeps staying resident:"), task
 | 
					                print(("task keeps staying resident:"), task)
 | 
				
			||||||
                return
 | 
					                return
 | 
				
			||||||
        if len(res):
 | 
					        if len(res):
 | 
				
			||||||
            print(">>> Error:"), res
 | 
					            print((">>> Error:"), res)
 | 
				
			||||||
            self.status = self.FAILED
 | 
					            self.status = self.FAILED
 | 
				
			||||||
            self.state_changed()
 | 
					            self.state_changed()
 | 
				
			||||||
            self.callback(self, task, res)
 | 
					            self.callback(self, task, res)
 | 
				
			||||||
        if cb_idx != self.current_task:
 | 
					        if cb_idx != self.current_task:
 | 
				
			||||||
            if cb_idx in self.resident_tasks:
 | 
					            if cb_idx in self.resident_tasks:
 | 
				
			||||||
                print("resident task finished:"), task
 | 
					                print(("resident task finished:"), task)
 | 
				
			||||||
                self.resident_tasks.remove(cb_idx)
 | 
					                self.resident_tasks.remove(cb_idx)
 | 
				
			||||||
        if res == []:
 | 
					        if res == []:
 | 
				
			||||||
            self.state_changed()
 | 
					            self.state_changed()
 | 
				
			||||||
@@ -177,16 +180,19 @@ class Task(object):
 | 
				
			|||||||
            if self.cwd is not None:
 | 
					            if self.cwd is not None:
 | 
				
			||||||
                self.container.setCWD(self.cwd)
 | 
					                self.container.setCWD(self.cwd)
 | 
				
			||||||
            if not self.cmd and self.cmdline:
 | 
					            if not self.cmd and self.cmdline:
 | 
				
			||||||
                print("execute:"), self.container.execute(self.cmdline), self.cmdline
 | 
					                print(("execute:"), self.container.execute(
 | 
				
			||||||
 | 
					                    self.cmdline), self.cmdline)
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                print("execute:"), self.container.execute(self.cmd, *self.args), ' '.join(self.args)
 | 
					                print(("execute:"), self.container.execute(
 | 
				
			||||||
 | 
					                    self.cmd, *self.args), ' '.join(self.args))
 | 
				
			||||||
            if self.initial_input:
 | 
					            if self.initial_input:
 | 
				
			||||||
                self.writeInput(self.initial_input)
 | 
					                self.writeInput(self.initial_input)
 | 
				
			||||||
            return
 | 
					            return
 | 
				
			||||||
            return
 | 
					            return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def run(self, callback):
 | 
					    def run(self, callback):
 | 
				
			||||||
        failed_preconditions = self.checkPreconditions(True) + self.checkPreconditions(False)
 | 
					        failed_preconditions = self.checkPreconditions(
 | 
				
			||||||
 | 
					            True) + self.checkPreconditions(False)
 | 
				
			||||||
        if failed_preconditions:
 | 
					        if failed_preconditions:
 | 
				
			||||||
            print("[Task] preconditions failed")
 | 
					            print("[Task] preconditions failed")
 | 
				
			||||||
            callback(self, failed_preconditions)
 | 
					            callback(self, failed_preconditions)
 | 
				
			||||||
@@ -196,7 +202,7 @@ class Task(object):
 | 
				
			|||||||
            self.prepare()
 | 
					            self.prepare()
 | 
				
			||||||
            self._run()
 | 
					            self._run()
 | 
				
			||||||
        except Exception as ex:
 | 
					        except Exception as ex:
 | 
				
			||||||
            print("[Task] exception:"), ex
 | 
					            print(("[Task] exception:"), ex)
 | 
				
			||||||
            self.postconditions = [FailedPostcondition(ex)]
 | 
					            self.postconditions = [FailedPostcondition(ex)]
 | 
				
			||||||
            self.finish()
 | 
					            self.finish()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -222,7 +228,7 @@ class Task(object):
 | 
				
			|||||||
            self.output_line = self.output_line[i + 1:]
 | 
					            self.output_line = self.output_line[i + 1:]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def processOutputLine(self, line):
 | 
					    def processOutputLine(self, line):
 | 
				
			||||||
        print("[Task %s]") % self.name, line[:-1]
 | 
					        print(("[Task %s]") % self.name, line[:-1])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def processFinished(self, returncode):
 | 
					    def processFinished(self, returncode):
 | 
				
			||||||
        self.returncode = returncode
 | 
					        self.returncode = returncode
 | 
				
			||||||
@@ -277,7 +283,7 @@ class LoggingTask(Task):
 | 
				
			|||||||
        self.log = []
 | 
					        self.log = []
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def processOutput(self, data):
 | 
					    def processOutput(self, data):
 | 
				
			||||||
        print("[%s]") % self.name, data,
 | 
					        print(("[%s]") % self.name, data, end=' ')
 | 
				
			||||||
        self.log.append(data)
 | 
					        self.log.append(data)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -294,7 +300,7 @@ class PythonTask(Task):
 | 
				
			|||||||
        self.timer.start(5)
 | 
					        self.timer.start(5)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def work(self):
 | 
					    def work(self):
 | 
				
			||||||
        raise (NotImplemented, "work")
 | 
					        raise NotImplemented
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def abort(self):
 | 
					    def abort(self):
 | 
				
			||||||
        self.aborted = True
 | 
					        self.aborted = True
 | 
				
			||||||
@@ -339,7 +345,7 @@ class ConditionTask(Task):
 | 
				
			|||||||
        self.triggerCount += 1
 | 
					        self.triggerCount += 1
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            if self.timeoutCount is not None and self.triggerCount > self.timeoutCount:
 | 
					            if self.timeoutCount is not None and self.triggerCount > self.timeoutCount:
 | 
				
			||||||
                raise (Exception, "Timeout elapsed, sorry")
 | 
					                raise Exception
 | 
				
			||||||
            res = self.check()
 | 
					            res = self.check()
 | 
				
			||||||
        except Exception as e:
 | 
					        except Exception as e:
 | 
				
			||||||
            self.postconditions.append(FailedPostcondition(e))
 | 
					            self.postconditions.append(FailedPostcondition(e))
 | 
				
			||||||
@@ -382,14 +388,16 @@ class JobManager:
 | 
				
			|||||||
        from Tools import Notifications
 | 
					        from Tools import Notifications
 | 
				
			||||||
        from Screens.MessageBox import MessageBox
 | 
					        from Screens.MessageBox import MessageBox
 | 
				
			||||||
        if problems[0].RECOVERABLE:
 | 
					        if problems[0].RECOVERABLE:
 | 
				
			||||||
            Notifications.AddNotificationWithCallback(self.errorCB, MessageBox, _('Error: %s\nRetry?') % problems[0].getErrorMessage(task))
 | 
					            Notifications.AddNotificationWithCallback(self.errorCB, MessageBox, _(
 | 
				
			||||||
 | 
					                'Error: %s\nRetry?') % problems[0].getErrorMessage(task))
 | 
				
			||||||
            return True
 | 
					            return True
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            Notifications.AddNotification(MessageBox, job.name + '\n' + _('Error') + ': %s' % problems[0].getErrorMessage(task), type=MessageBox.TYPE_ERROR)
 | 
					            Notifications.AddNotification(MessageBox, job.name + '\n' + _(
 | 
				
			||||||
 | 
					                'Error') + ': %s' % problems[0].getErrorMessage(task), type=MessageBox.TYPE_ERROR)
 | 
				
			||||||
            return False
 | 
					            return False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def jobDone(self, job, task, problems):
 | 
					    def jobDone(self, job, task, problems):
 | 
				
			||||||
        print("job"), job, ("completed with"), problems, ("in"), task
 | 
					        print(("job"), job, ("completed with"), problems, ("in"), task)
 | 
				
			||||||
        if problems:
 | 
					        if problems:
 | 
				
			||||||
            if not job.onFail(job, task, problems):
 | 
					            if not job.onFail(job, task, problems):
 | 
				
			||||||
                self.errorCB(False)
 | 
					                self.errorCB(False)
 | 
				
			||||||
@@ -464,12 +472,14 @@ class ToolExistsPrecondition(Condition):
 | 
				
			|||||||
        import os
 | 
					        import os
 | 
				
			||||||
        if task.cmd[0] == '/':
 | 
					        if task.cmd[0] == '/':
 | 
				
			||||||
            self.realpath = task.cmd
 | 
					            self.realpath = task.cmd
 | 
				
			||||||
            print("[Task.py][ToolExistsPrecondition] WARNING: usage of absolute paths for tasks should be avoided!")
 | 
					            print(
 | 
				
			||||||
 | 
					                "[Task.py][ToolExistsPrecondition] WARNING: usage of absolute paths for tasks should be avoided!")
 | 
				
			||||||
            return os.access(self.realpath, os.X_OK)
 | 
					            return os.access(self.realpath, os.X_OK)
 | 
				
			||||||
        self.realpath = task.cmd
 | 
					        self.realpath = task.cmd
 | 
				
			||||||
        path = os.environ.get('PATH', '').split(os.pathsep)
 | 
					        path = os.environ.get('PATH', '').split(os.pathsep)
 | 
				
			||||||
        path.append(task.cwd + '/')
 | 
					        path.append(task.cwd + '/')
 | 
				
			||||||
        absolutes = filter(lambda file: os.access(file, os.X_OK), map(lambda directory, file=task.cmd: os.path.join(directory, file), path))
 | 
					        absolutes = [file for file in map(lambda directory, file=task.cmd: os.path.join(
 | 
				
			||||||
 | 
					            directory, file), path) if os.access(file, os.X_OK)]
 | 
				
			||||||
        if absolutes:
 | 
					        if absolutes:
 | 
				
			||||||
            self.realpath = absolutes[0]
 | 
					            self.realpath = absolutes[0]
 | 
				
			||||||
            return True
 | 
					            return True
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
# -*- coding: utf-8 -*-
 | 
					# -*- coding: utf-8 -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from __future__ import print_function
 | 
					
 | 
				
			||||||
from Components.Language import language
 | 
					from Components.Language import language
 | 
				
			||||||
from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_LANGUAGE
 | 
					from Tools.Directories import resolveFilename, SCOPE_PLUGINS, SCOPE_LANGUAGE
 | 
				
			||||||
import os
 | 
					import os
 | 
				
			||||||
@@ -13,7 +13,8 @@ def localeInit():
 | 
				
			|||||||
    lang = language.getLanguage()[:2]
 | 
					    lang = language.getLanguage()[:2]
 | 
				
			||||||
    os.environ['LANGUAGE'] = lang
 | 
					    os.environ['LANGUAGE'] = lang
 | 
				
			||||||
    print("[NeoBoot] set language to "), lang
 | 
					    print("[NeoBoot] set language to "), lang
 | 
				
			||||||
    gettext.bindtextdomain(PluginLanguageDomain, resolveFilename(SCOPE_PLUGINS, PluginLanguagePath))
 | 
					    gettext.bindtextdomain(PluginLanguageDomain, resolveFilename(
 | 
				
			||||||
 | 
					        SCOPE_PLUGINS, PluginLanguagePath))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def _(txt):
 | 
					def _(txt):
 | 
				
			||||||
 
 | 
				
			|||||||
										
											Binary file not shown.
										
									
								
							@@ -29,11 +29,8 @@ import os
 | 
				
			|||||||
from Screens.VirtualKeyBoard import VirtualKeyBoard
 | 
					from Screens.VirtualKeyBoard import VirtualKeyBoard
 | 
				
			||||||
import gettext
 | 
					import gettext
 | 
				
			||||||
from Plugins.Extensions.NeoBoot.files.stbbranding import getTunerModel, getCheckExt, getBoxHostName, getMyUUID
 | 
					from Plugins.Extensions.NeoBoot.files.stbbranding import getTunerModel, getCheckExt, getBoxHostName, getMyUUID
 | 
				
			||||||
if not fileExists('/usr/lib/python2.7'):
 | 
					import subprocess
 | 
				
			||||||
    open = file
 | 
					    
 | 
				
			||||||
    getoutput = "os.system"    
 | 
					 | 
				
			||||||
else:
 | 
					 | 
				
			||||||
    from commands import getoutput
 | 
					 | 
				
			||||||
LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
 | 
					LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class ManagerDevice(Screen):
 | 
					class ManagerDevice(Screen):
 | 
				
			||||||
@@ -605,29 +602,37 @@ class SetDiskLabel(Screen):
 | 
				
			|||||||
    def sprDev(self):
 | 
					    def sprDev(self):
 | 
				
			||||||
        global lista
 | 
					        global lista
 | 
				
			||||||
        lista = ['']
 | 
					        lista = ['']
 | 
				
			||||||
        if getTunerModel() in ('sf8008', 'sf8008s', 'sf8008t'):
 | 
					        tuner_model = getTunerModel()
 | 
				
			||||||
 | 
					        blackL = ''
 | 
				
			||||||
 | 
					        if tuner_model in ('sf8008', 'sf8008s', 'sf8008t'):
 | 
				
			||||||
            blackL = 'mmcblk0'
 | 
					            blackL = 'mmcblk0'
 | 
				
			||||||
        if getTunerModel() in ('h9se'):
 | 
					        elif tuner_model in ('h9se'):
 | 
				
			||||||
            blackL = 'mmcblk1'
 | 
					            blackL = 'mmcblk1'
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            blackL = getoutput('cat /etc/udev/mount-helper.sh | grep "BLACKLISTED="')
 | 
					            try:
 | 
				
			||||||
            blackL = blackL[13:-1]
 | 
					                blackL_output = subprocess.getoutput('cat /etc/udev/mount-helper.sh | grep "BLACKLISTED="')
 | 
				
			||||||
        devL = getoutput('cat /proc/partitions | grep "sd\\|mmc" | awk \'{print $4}\'')
 | 
					                blackL = blackL_output[13:-1]
 | 
				
			||||||
        devL = devL.split('\n')
 | 
					            except Exception:
 | 
				
			||||||
 | 
					                blackL = ''
 | 
				
			||||||
 | 
					        try:
 | 
				
			||||||
 | 
					            devL_output = subprocess.getoutput('cat /proc/partitions | grep "sd\\|mmc" | awk \'{print $4}\'')
 | 
				
			||||||
 | 
					            devL = devL_output.split('\n')
 | 
				
			||||||
 | 
					        except Exception:
 | 
				
			||||||
 | 
					            devL = []
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        ilosc = len(devL)
 | 
					        ilosc = len(devL)
 | 
				
			||||||
        i = 0
 | 
					        i = 0
 | 
				
			||||||
        while i < ilosc:
 | 
					        while i < ilosc:
 | 
				
			||||||
            if len(devL[i]) == 9 or len(devL[i]) == 4:
 | 
					            if len(devL[i]) == 9 or len(devL[i]) == 4:
 | 
				
			||||||
                if devL[i][:7] != blackL:
 | 
					                if devL[i][:7] != blackL:
 | 
				
			||||||
                    if self.sprLinux(devL[i]) == True:
 | 
					                    if self.sprLinux(devL[i]) is True:
 | 
				
			||||||
                        lista.append(devL[i])
 | 
					                        lista.append(devL[i])
 | 
				
			||||||
            i += 1
 | 
					            i += 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if ilosc > 0:
 | 
					        if ilosc > 0 and '' in lista:
 | 
				
			||||||
            lista.remove('')
 | 
					            lista.remove('')
 | 
				
			||||||
        elif lista[0] == '':
 | 
					        elif not lista and not ilosc:
 | 
				
			||||||
            lista.remove('')
 | 
					            lista.append('No Disk')
 | 
				
			||||||
            lista.insert(0, 'No Disk')
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def cancel(self):
 | 
					    def cancel(self):
 | 
				
			||||||
        self.close()
 | 
					        self.close()
 | 
				
			||||||
@@ -676,20 +681,26 @@ class SetDiskLabel(Screen):
 | 
				
			|||||||
        return
 | 
					        return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def sprLabel(self):
 | 
					    def sprLabel(self):
 | 
				
			||||||
        lab = getoutput('blkid /dev/' + self['devlist'].getCurrent())
 | 
					        current_device = self['devlist'].getCurrent()
 | 
				
			||||||
        lab1 = lab.split(' ')
 | 
					        if not current_device:
 | 
				
			||||||
        licz1 = len(lab1)
 | 
					            self['disklabel'].setText(_('No device selected'))
 | 
				
			||||||
        i = 0
 | 
					            return
 | 
				
			||||||
        while i < licz1:
 | 
					        try:
 | 
				
			||||||
            if lab1[i][:5] == 'LABEL':
 | 
					            lab_output = subprocess.getoutput('blkid /dev/' + current_device)
 | 
				
			||||||
                self['disklabel'].setText(lab1[i][7:-1])
 | 
					        except Exception:
 | 
				
			||||||
                break
 | 
					            lab_output = ''
 | 
				
			||||||
            else:
 | 
					        if lab_output:
 | 
				
			||||||
 | 
					            lab1 = lab_output.split(' ')
 | 
				
			||||||
 | 
					            for item in lab1:
 | 
				
			||||||
 | 
					                if item.startswith('LABEL='):
 | 
				
			||||||
 | 
					                    label = item.split('"')[1]
 | 
				
			||||||
 | 
					                    self['disklabel'].setText(label)
 | 
				
			||||||
 | 
					                    return
 | 
				
			||||||
 | 
					                    
 | 
				
			||||||
        self['disklabel'].setText(_('No label'))
 | 
					        self['disklabel'].setText(_('No label'))
 | 
				
			||||||
            i += 1
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def sprLinux(self, dev):
 | 
					    def sprLinux(self, dev):
 | 
				
			||||||
        lab = getoutput('blkid /dev/' + dev)
 | 
					        lab = subprocess.getoutput('blkid /dev/' + dev)
 | 
				
			||||||
        lab1 = lab.split(' ')
 | 
					        lab1 = lab.split(' ')
 | 
				
			||||||
        licz1 = len(lab1)
 | 
					        licz1 = len(lab1)
 | 
				
			||||||
        jest = False
 | 
					        jest = False
 | 
				
			||||||
@@ -700,7 +711,6 @@ class SetDiskLabel(Screen):
 | 
				
			|||||||
                return jest
 | 
					                return jest
 | 
				
			||||||
            jest = False
 | 
					            jest = False
 | 
				
			||||||
            j += 1
 | 
					            j += 1
 | 
				
			||||||
 | 
					 | 
				
			||||||
        return jest
 | 
					        return jest
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    def MyClose(self):
 | 
					    def MyClose(self):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
# -*- coding: utf-8 -*-
 | 
					# -*- coding: utf-8 -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from Plugins.Extensions.NeoBoot.__init__ import _
 | 
					from Plugins.Extensions.NeoBoot.__init__ import _
 | 
				
			||||||
#from __future__ import print_function
 | 
					# from __future__ import print_function
 | 
				
			||||||
from enigma import eConsoleAppContainer
 | 
					from enigma import eConsoleAppContainer
 | 
				
			||||||
from Screens.Screen import Screen
 | 
					from Screens.Screen import Screen
 | 
				
			||||||
from Components.ActionMap import ActionMap
 | 
					from Components.ActionMap import ActionMap
 | 
				
			||||||
@@ -59,7 +59,8 @@ class Console(Screen):
 | 
				
			|||||||
    def startRun(self):
 | 
					    def startRun(self):
 | 
				
			||||||
        self['text'].setText(_('Execution progress:') + '\n\n')
 | 
					        self['text'].setText(_('Execution progress:') + '\n\n')
 | 
				
			||||||
        self['summary_description'].setText(_('Execution progress:'))
 | 
					        self['summary_description'].setText(_('Execution progress:'))
 | 
				
			||||||
        print("[Console] executing in run"), self.run, (" the command:"), self.cmdlist[self.run]
 | 
					        print(("[Console] executing in run"), self.run,
 | 
				
			||||||
 | 
					              (" the command:"), self.cmdlist[self.run])
 | 
				
			||||||
        if self.doExec(self.cmdlist[self.run]):
 | 
					        if self.doExec(self.cmdlist[self.run]):
 | 
				
			||||||
            self.runFinished(-1)
 | 
					            self.runFinished(-1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -72,8 +73,8 @@ class Console(Screen):
 | 
				
			|||||||
            if self.doExec(self.cmdlist[self.run]):
 | 
					            if self.doExec(self.cmdlist[self.run]):
 | 
				
			||||||
                self.runFinished(-1)
 | 
					                self.runFinished(-1)
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
#            self['key_red'].setText(_('Close'))
 | 
					            #            self['key_red'].setText(_('Close'))
 | 
				
			||||||
#            self['key_green'].setText(_('Save'))
 | 
					            #            self['key_green'].setText(_('Save'))
 | 
				
			||||||
            self.toggleScreenHide(True)
 | 
					            self.toggleScreenHide(True)
 | 
				
			||||||
            if self.cancel_msg:
 | 
					            if self.cancel_msg:
 | 
				
			||||||
                self.cancel_msg.close()
 | 
					                self.cancel_msg.close()
 | 
				
			||||||
@@ -81,7 +82,8 @@ class Console(Screen):
 | 
				
			|||||||
            if not fileExists('/etc/vtiversion.info'):
 | 
					            if not fileExists('/etc/vtiversion.info'):
 | 
				
			||||||
                lastpage = self['text'].isAtLastPage()
 | 
					                lastpage = self['text'].isAtLastPage()
 | 
				
			||||||
            self['text'].appendText('\n' + _('Execution finished!!'))
 | 
					            self['text'].appendText('\n' + _('Execution finished!!'))
 | 
				
			||||||
            self['summary_description'].setText('\n' + _('Execution finished!!'))
 | 
					            self['summary_description'].setText(
 | 
				
			||||||
 | 
					                '\n' + _('Execution finished!!'))
 | 
				
			||||||
            if self.finishedCallback is not None:
 | 
					            if self.finishedCallback is not None:
 | 
				
			||||||
                self.finishedCallback()
 | 
					                self.finishedCallback()
 | 
				
			||||||
            if not self.errorOcurred and self.closeOnSuccess:
 | 
					            if not self.errorOcurred and self.closeOnSuccess:
 | 
				
			||||||
@@ -113,7 +115,7 @@ class Console(Screen):
 | 
				
			|||||||
            self.output_file = 'end'
 | 
					            self.output_file = 'end'
 | 
				
			||||||
        elif self.run == len(self.cmdlist):
 | 
					        elif self.run == len(self.cmdlist):
 | 
				
			||||||
            self.saveOutputText()
 | 
					            self.saveOutputText()
 | 
				
			||||||
            #self.toggleScreenHide()
 | 
					            # self.toggleScreenHide()
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            self.toggleScreenHide()
 | 
					            self.toggleScreenHide()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -124,7 +126,8 @@ class Console(Screen):
 | 
				
			|||||||
        if self.run == len(self.cmdlist):
 | 
					        if self.run == len(self.cmdlist):
 | 
				
			||||||
            self.cancel()
 | 
					            self.cancel()
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            self.cancel_msg = self.session.openWithCallback(self.cancelCB, MessageBox, _('Cancel execution?'), type=MessageBox.TYPE_YESNO, default=False)
 | 
					            self.cancel_msg = self.session.openWithCallback(self.cancelCB, MessageBox, _(
 | 
				
			||||||
 | 
					                'Cancel execution?'), type=MessageBox.TYPE_YESNO, default=False)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def cancelCB(self, ret=None):
 | 
					    def cancelCB(self, ret=None):
 | 
				
			||||||
        self.cancel_msg = None
 | 
					        self.cancel_msg = None
 | 
				
			||||||
@@ -135,8 +138,10 @@ class Console(Screen):
 | 
				
			|||||||
    def saveOutputText(self):
 | 
					    def saveOutputText(self):
 | 
				
			||||||
        from time import time, localtime
 | 
					        from time import time, localtime
 | 
				
			||||||
        lt = localtime(time())
 | 
					        lt = localtime(time())
 | 
				
			||||||
        self.output_file = '/tmp/%02d%02d%02d_console.txt' % (lt[3], lt[4], lt[5])
 | 
					        self.output_file = '/tmp/%02d%02d%02d_console.txt' % (
 | 
				
			||||||
        self.session.openWithCallback(self.saveOutputTextCB, MessageBox, _("Save the commands and the output to a file?\n('%s')") % self.output_file, type=MessageBox.TYPE_YESNO, default=True)
 | 
					            lt[3], lt[4], lt[5])
 | 
				
			||||||
 | 
					        self.session.openWithCallback(self.saveOutputTextCB, MessageBox, _(
 | 
				
			||||||
 | 
					            "Save the commands and the output to a file?\n('%s')") % self.output_file, type=MessageBox.TYPE_YESNO, default=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def formatCmdList(self, source):
 | 
					    def formatCmdList(self, source):
 | 
				
			||||||
        if isinstance(source, (list, tuple)):
 | 
					        if isinstance(source, (list, tuple)):
 | 
				
			||||||
@@ -164,13 +169,16 @@ class Console(Screen):
 | 
				
			|||||||
                            break
 | 
					                            break
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    if script and path.isfile(script):
 | 
					                    if script and path.isfile(script):
 | 
				
			||||||
                        text += 'script listing: %s\n\n%s\n\n' % (script, self.readFile(script))
 | 
					                        text += 'script listing: %s\n\n%s\n\n' % (
 | 
				
			||||||
 | 
					                            script, self.readFile(script))
 | 
				
			||||||
                    if len(cmdlist) > 1:
 | 
					                    if len(cmdlist) > 1:
 | 
				
			||||||
                        text += 'next commands:\n\n' + '\n'.join(cmdlist[1:]) + '\n\n'
 | 
					                        text += 'next commands:\n\n' + \
 | 
				
			||||||
 | 
					                            '\n'.join(cmdlist[1:]) + '\n\n'
 | 
				
			||||||
                except:
 | 
					                except:
 | 
				
			||||||
                    text += 'error read commands!!!\n\n'
 | 
					                    text += 'error read commands!!!\n\n'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                text += '-' * 50 + '\n\noutputs ...\n\n%s' % self['text'].getText()
 | 
					                text += '-' * 50 + \
 | 
				
			||||||
 | 
					                    '\n\noutputs ...\n\n%s' % self['text'].getText()
 | 
				
			||||||
                try:
 | 
					                try:
 | 
				
			||||||
                    f = open(self.output_file, 'w')
 | 
					                    f = open(self.output_file, 'w')
 | 
				
			||||||
                    f.write(text)
 | 
					                    f.write(text)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
# -*- coding: utf-8 -*-
 | 
					# -*- coding: utf-8 -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#from Plugins.Extensions.NeoBoot.__init__ import _
 | 
					# from Plugins.Extensions.NeoBoot.__init__ import _
 | 
				
			||||||
import sys
 | 
					import sys
 | 
				
			||||||
import os
 | 
					import os
 | 
				
			||||||
import time
 | 
					import time
 | 
				
			||||||
@@ -9,9 +9,10 @@ LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
LogFileObj = None
 | 
					LogFileObj = None
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def Log(param=''):
 | 
					def Log(param=''):
 | 
				
			||||||
    global LogFileObj
 | 
					    global LogFileObj
 | 
				
			||||||
    #first close object if exists
 | 
					    # first close object if exists
 | 
				
			||||||
    if param.lower() in ['open', 'write', 'append', 'close']:
 | 
					    if param.lower() in ['open', 'write', 'append', 'close']:
 | 
				
			||||||
        if LogFileObj is not None:
 | 
					        if LogFileObj is not None:
 | 
				
			||||||
            LogFileObj.close()
 | 
					            LogFileObj.close()
 | 
				
			||||||
@@ -25,7 +26,7 @@ def Log(param=''):
 | 
				
			|||||||
                    print("ERROR closing LogFile!!!")
 | 
					                    print("ERROR closing LogFile!!!")
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                print("ERROR closing LogFile!!!")
 | 
					                print("ERROR closing LogFile!!!")
 | 
				
			||||||
    #second create object if does not exist
 | 
					    # second create object if does not exist
 | 
				
			||||||
    if LogFileObj is None:
 | 
					    if LogFileObj is None:
 | 
				
			||||||
        if param.lower() in ['open', 'write']:
 | 
					        if param.lower() in ['open', 'write']:
 | 
				
			||||||
            LogFileObj = open(LogFile, "w")
 | 
					            LogFileObj = open(LogFile, "w")
 | 
				
			||||||
@@ -94,10 +95,10 @@ def getSupportedTuners():
 | 
				
			|||||||
def getFreespace(dev):
 | 
					def getFreespace(dev):
 | 
				
			||||||
    statdev = os.statvfs(dev)
 | 
					    statdev = os.statvfs(dev)
 | 
				
			||||||
    space = statdev.f_bavail * statdev.f_frsize / 1024
 | 
					    space = statdev.f_bavail * statdev.f_frsize / 1024
 | 
				
			||||||
    print("[NeoBoot] Free space on %s = %i kilobytes") % (dev, space)
 | 
					    print(("[NeoBoot] Free space on %s = %i kilobytes") % (dev, space))
 | 
				
			||||||
    return space
 | 
					    return space
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#check install
 | 
					# check install
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getCheckInstal1():
 | 
					def getCheckInstal1():
 | 
				
			||||||
@@ -133,7 +134,7 @@ def getCheckInstal3():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return neocheckinstal
 | 
					    return neocheckinstal
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#check imageATV
 | 
					# check imageATV
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getImageATv():
 | 
					def getImageATv():
 | 
				
			||||||
@@ -146,7 +147,7 @@ def getImageATv():
 | 
				
			|||||||
            atvimage = 'okfeedCAMatv'
 | 
					            atvimage = 'okfeedCAMatv'
 | 
				
			||||||
    return atvimage
 | 
					    return atvimage
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#check install
 | 
					# check install
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getNeoLocation():
 | 
					def getNeoLocation():
 | 
				
			||||||
@@ -164,7 +165,7 @@ def getNeoLocation():
 | 
				
			|||||||
    return locatinoneo
 | 
					    return locatinoneo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#check ext
 | 
					# check ext
 | 
				
			||||||
def getFormat():
 | 
					def getFormat():
 | 
				
			||||||
    neoformat = 'UNKNOWN'
 | 
					    neoformat = 'UNKNOWN'
 | 
				
			||||||
    if os.path.exists('/proc/mounts'):
 | 
					    if os.path.exists('/proc/mounts'):
 | 
				
			||||||
@@ -200,7 +201,7 @@ def getNEO_filesystems():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return neo_filesystems
 | 
					    return neo_filesystems
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#typ procesora arm lub mips
 | 
					# typ procesora arm lub mips
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getCPUtype():
 | 
					def getCPUtype():
 | 
				
			||||||
@@ -215,7 +216,7 @@ def getCPUtype():
 | 
				
			|||||||
            cpu = 'MIPS'
 | 
					            cpu = 'MIPS'
 | 
				
			||||||
    return cpu
 | 
					    return cpu
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#check install
 | 
					# check install
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getFSTAB():
 | 
					def getFSTAB():
 | 
				
			||||||
@@ -334,7 +335,7 @@ def getLabelDisck():
 | 
				
			|||||||
            label = 'LABEL='
 | 
					            label = 'LABEL='
 | 
				
			||||||
    return label
 | 
					    return label
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#checking device  neo
 | 
					# checking device  neo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getNeoMountDisc():
 | 
					def getNeoMountDisc():
 | 
				
			||||||
@@ -472,7 +473,7 @@ def getNeoMount5():
 | 
				
			|||||||
    return neo
 | 
					    return neo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#zwraca typ chipa prcesora
 | 
					# zwraca typ chipa prcesora
 | 
				
			||||||
def getCPUSoC():
 | 
					def getCPUSoC():
 | 
				
			||||||
    chipset = 'UNKNOWN'
 | 
					    chipset = 'UNKNOWN'
 | 
				
			||||||
    if os.path.exists('/proc/stb/info/chipset'):
 | 
					    if os.path.exists('/proc/stb/info/chipset'):
 | 
				
			||||||
@@ -492,7 +493,7 @@ def getCPUSoCModel():
 | 
				
			|||||||
            f.close()
 | 
					            f.close()
 | 
				
			||||||
    return devicetree
 | 
					    return devicetree
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#zwraca wybrane image w neoboot do uruchomienia
 | 
					# zwraca wybrane image w neoboot do uruchomienia
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getImageNeoBoot():
 | 
					def getImageNeoBoot():
 | 
				
			||||||
@@ -503,7 +504,7 @@ def getImageNeoBoot():
 | 
				
			|||||||
            f.close()
 | 
					            f.close()
 | 
				
			||||||
    return imagefile
 | 
					    return imagefile
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#zwraca model vuplus
 | 
					# zwraca model vuplus
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getBoxVuModel():
 | 
					def getBoxVuModel():
 | 
				
			||||||
@@ -525,10 +526,11 @@ def getVuModel():
 | 
				
			|||||||
        f = open("/proc/stb/info/vumodel", 'r')
 | 
					        f = open("/proc/stb/info/vumodel", 'r')
 | 
				
			||||||
        procmodel = f.readline().strip()
 | 
					        procmodel = f.readline().strip()
 | 
				
			||||||
        f.close()
 | 
					        f.close()
 | 
				
			||||||
        model = procmodel.title().replace("olose", "olo SE").replace("olo2se", "olo2 SE").replace("2", "²")
 | 
					        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():
 | 
					def getBoxHostName():
 | 
				
			||||||
@@ -538,10 +540,10 @@ def getBoxHostName():
 | 
				
			|||||||
            f.close()
 | 
					            f.close()
 | 
				
			||||||
    return myboxname
 | 
					    return myboxname
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#zwraca vuplus/vumodel
 | 
					# zwraca vuplus/vumodel
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getTunerModel(): #< neoboot.py
 | 
					def getTunerModel():  # < neoboot.py
 | 
				
			||||||
    BOX_NAME = ''
 | 
					    BOX_NAME = ''
 | 
				
			||||||
    if os.path.isfile('/proc/stb/info/vumodel') and not os.path.isfile("/proc/stb/info/boxtype"):
 | 
					    if os.path.isfile('/proc/stb/info/vumodel') and not os.path.isfile("/proc/stb/info/boxtype"):
 | 
				
			||||||
        BOX_NAME = open('/proc/stb/info/vumodel').read().strip()
 | 
					        BOX_NAME = open('/proc/stb/info/vumodel').read().strip()
 | 
				
			||||||
@@ -552,7 +554,7 @@ def getTunerModel(): #< neoboot.py
 | 
				
			|||||||
        BOX_NAME = open('/proc/stb/info/model').read().strip()
 | 
					        BOX_NAME = open('/proc/stb/info/model').read().strip()
 | 
				
			||||||
    return BOX_NAME
 | 
					    return BOX_NAME
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#zwraca strukture folderu zip - vuplus/vumodel
 | 
					# zwraca strukture folderu zip - vuplus/vumodel
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getImageFolder():
 | 
					def getImageFolder():
 | 
				
			||||||
@@ -561,7 +563,7 @@ def getImageFolder():
 | 
				
			|||||||
        ImageFolder = 'vuplus/' + BOX_NAME
 | 
					        ImageFolder = 'vuplus/' + BOX_NAME
 | 
				
			||||||
    return ImageFolder
 | 
					    return ImageFolder
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#zwraca nazwe kernela z /lib/modules
 | 
					# zwraca nazwe kernela z /lib/modules
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getKernelVersion():
 | 
					def getKernelVersion():
 | 
				
			||||||
@@ -576,7 +578,7 @@ def getKernelVersion():
 | 
				
			|||||||
def runCMDS(cmdsList):
 | 
					def runCMDS(cmdsList):
 | 
				
			||||||
    clearMemory()
 | 
					    clearMemory()
 | 
				
			||||||
    if isinstance(cmdsList, (list, tuple)):
 | 
					    if isinstance(cmdsList, (list, tuple)):
 | 
				
			||||||
        myCMD = '\n'.join(cmdsList)# + '\n'
 | 
					        myCMD = '\n'.join(cmdsList)  # + '\n'
 | 
				
			||||||
    ret = os.system(myCMD)
 | 
					    ret = os.system(myCMD)
 | 
				
			||||||
    return rett
 | 
					    return rett
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -644,7 +646,8 @@ def getKernelVersionString():
 | 
				
			|||||||
def getKernelImageVersion():
 | 
					def getKernelImageVersion():
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        from glob import glob
 | 
					        from glob import glob
 | 
				
			||||||
        lines = open(glob('/var/lib/opkg/info/kernel-*.control')[0], 'r').readlines()
 | 
					        lines = open(glob('/var/lib/opkg/info/kernel-*.control')
 | 
				
			||||||
 | 
					                     [0], 'r').readlines()
 | 
				
			||||||
        kernelimage = lines[1][:-1]
 | 
					        kernelimage = lines[1][:-1]
 | 
				
			||||||
    except:
 | 
					    except:
 | 
				
			||||||
        kernelimage = getKernelVersionString
 | 
					        kernelimage = getKernelVersionString
 | 
				
			||||||
@@ -909,146 +912,198 @@ def getMachineProcModel():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getMountPointAll():
 | 
					def getMountPointAll():
 | 
				
			||||||
            os.system('touch ' + LinkNeoBoot + '/files/mountpoint.sh; echo "#!/bin/sh\n"  >> ' + LinkNeoBoot + '/files/mountpoint.sh; chmod 0755 ' + 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':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        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':
 | 
					    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('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':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        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 getNeoMount2() == 'usb_install_/dev/sdg1':
 | 
					    elif getNeoMount2() == 'usb_install_/dev/sdg1':
 | 
				
			||||||
                    os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\nmkdir -p /media/sdg1\n/bin/mount /dev/sdg1 /media/sdg1\n/bin/mount /dev/sdg1 /media/usb"  >> ' + LinkNeoBoot + '/files/mountpoint.sh')
 | 
					        os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\nmkdir -p /media/sdg1\n/bin/mount /dev/sdg1 /media/sdg1\n/bin/mount /dev/sdg1 /media/usb"  >> ' +
 | 
				
			||||||
 | 
					                  LinkNeoBoot + '/files/mountpoint.sh')
 | 
				
			||||||
    elif getNeoMount2() == 'usb_install_/dev/sdh1':
 | 
					    elif getNeoMount2() == 'usb_install_/dev/sdh1':
 | 
				
			||||||
                    os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\nmkdir -p /media/sdh1\n/bin/mount /dev/sdh1 /media/sdh1\n/bin/mount /dev/sdh1 /media/usb"  >> ' + LinkNeoBoot + '/files/mountpoint.sh')
 | 
					        os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\nmkdir -p /media/sdh1\n/bin/mount /dev/sdh1 /media/sdh1\n/bin/mount /dev/sdh1 /media/usb"  >> ' +
 | 
				
			||||||
            #---------------------------------------------
 | 
					                  LinkNeoBoot + '/files/mountpoint.sh')
 | 
				
			||||||
 | 
					    # ---------------------------------------------
 | 
				
			||||||
    elif getNeoMount3() == 'cf_install_/dev/sda1':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        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 getNeoMount4() == 'card_install_/dev/sda1':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        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':
 | 
					    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 "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')
 | 
					    os.system('echo "\n\nexit 0"  >> ' + LinkNeoBoot + '/files/mountpoint.sh')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getMountPointNeo():
 | 
					def getMountPointNeo():
 | 
				
			||||||
    os.system('' + LinkNeoBoot + '/files/mountpoint.sh')
 | 
					    os.system('' + LinkNeoBoot + '/files/mountpoint.sh')
 | 
				
			||||||
            os.system('echo ' + getLocationMultiboot() + ' > ' + LinkNeoBoot + '/bin/install; chmod 0755 ' + LinkNeoBoot + '/bin/install')
 | 
					    os.system('echo ' + getLocationMultiboot() + ' > ' + LinkNeoBoot +
 | 
				
			||||||
 | 
					              '/bin/install; chmod 0755 ' + LinkNeoBoot + '/bin/install')
 | 
				
			||||||
    if getLocationMultiboot() == '/dev/sda1':
 | 
					    if getLocationMultiboot() == '/dev/sda1':
 | 
				
			||||||
        out = open('' + LinkNeoBoot + '/files/neo.sh', 'w')
 | 
					        out = open('' + LinkNeoBoot + '/files/neo.sh', 'w')
 | 
				
			||||||
                    out.write('#!/bin/sh\n\n/bin/mount /dev/sda1 ' + getNeoLocation() + '  \n\nexit 0')
 | 
					        out.write('#!/bin/sh\n\n/bin/mount /dev/sda1 ' +
 | 
				
			||||||
 | 
					                  getNeoLocation() + '  \n\nexit 0')
 | 
				
			||||||
        out.close()
 | 
					        out.close()
 | 
				
			||||||
    elif getLocationMultiboot() == '/dev/sdb1':
 | 
					    elif getLocationMultiboot() == '/dev/sdb1':
 | 
				
			||||||
        out = open('' + LinkNeoBoot + '/files/neo.sh', 'w')
 | 
					        out = open('' + LinkNeoBoot + '/files/neo.sh', 'w')
 | 
				
			||||||
                    out.write('#!/bin/sh\n\n/bin/mount /dev/sdb1 ' + getNeoLocation() + '  \n\nexit 0')
 | 
					        out.write('#!/bin/sh\n\n/bin/mount /dev/sdb1 ' +
 | 
				
			||||||
 | 
					                  getNeoLocation() + '  \n\nexit 0')
 | 
				
			||||||
        out.close()
 | 
					        out.close()
 | 
				
			||||||
    elif getLocationMultiboot() == '/dev/sda2':
 | 
					    elif getLocationMultiboot() == '/dev/sda2':
 | 
				
			||||||
        out = open('' + LinkNeoBoot + '/files/neo.sh', 'w')
 | 
					        out = open('' + LinkNeoBoot + '/files/neo.sh', 'w')
 | 
				
			||||||
                    out.write('#!/bin/sh\n\n/bin/mount /dev/sda2 ' + getNeoLocation() + '  \n\nexit 0')
 | 
					        out.write('#!/bin/sh\n\n/bin/mount /dev/sda2 ' +
 | 
				
			||||||
 | 
					                  getNeoLocation() + '  \n\nexit 0')
 | 
				
			||||||
        out.close()
 | 
					        out.close()
 | 
				
			||||||
    elif getLocationMultiboot() == '/dev/sdb2':
 | 
					    elif getLocationMultiboot() == '/dev/sdb2':
 | 
				
			||||||
        out = open('' + LinkNeoBoot + '/files/neo.sh', 'w')
 | 
					        out = open('' + LinkNeoBoot + '/files/neo.sh', 'w')
 | 
				
			||||||
                    out.write('#!/bin/sh\n\n/bin/mount /dev/sdb2 ' + getNeoLocation() + '  \n\nexit 0')
 | 
					        out.write('#!/bin/sh\n\n/bin/mount /dev/sdb2 ' +
 | 
				
			||||||
 | 
					                  getNeoLocation() + '  \n\nexit 0')
 | 
				
			||||||
        out.close()
 | 
					        out.close()
 | 
				
			||||||
    elif getLocationMultiboot() == '/dev/sdc1':
 | 
					    elif getLocationMultiboot() == '/dev/sdc1':
 | 
				
			||||||
        out = open('' + LinkNeoBoot + '/files/neo.sh', 'w')
 | 
					        out = open('' + LinkNeoBoot + '/files/neo.sh', 'w')
 | 
				
			||||||
                    out.write('#!/bin/sh\n\n/bin/mount /dev/sdc1 ' + getNeoLocation() + '  \n\nexit 0')
 | 
					        out.write('#!/bin/sh\n\n/bin/mount /dev/sdc1 ' +
 | 
				
			||||||
 | 
					                  getNeoLocation() + '  \n\nexit 0')
 | 
				
			||||||
        out.close()
 | 
					        out.close()
 | 
				
			||||||
    elif getLocationMultiboot() == '/dev/sdd1':
 | 
					    elif getLocationMultiboot() == '/dev/sdd1':
 | 
				
			||||||
        out = open('' + LinkNeoBoot + '/files/neo.sh', 'w')
 | 
					        out = open('' + LinkNeoBoot + '/files/neo.sh', 'w')
 | 
				
			||||||
                    out.write('#!/bin/sh\n\n/bin/mount /dev/sdd1 ' + getNeoLocation() + '  \n\nexit 0')
 | 
					        out.write('#!/bin/sh\n\n/bin/mount /dev/sdd1 ' +
 | 
				
			||||||
 | 
					                  getNeoLocation() + '  \n\nexit 0')
 | 
				
			||||||
        out.close()
 | 
					        out.close()
 | 
				
			||||||
    elif getLocationMultiboot() == '/dev/sde1':
 | 
					    elif getLocationMultiboot() == '/dev/sde1':
 | 
				
			||||||
        out = open('' + LinkNeoBoot + '/files/neo.sh', 'w')
 | 
					        out = open('' + LinkNeoBoot + '/files/neo.sh', 'w')
 | 
				
			||||||
                    out.write('#!/bin/sh\n\n/bin/mount /dev/sde1 ' + getNeoLocation() + '  \n\nexit 0')
 | 
					        out.write('#!/bin/sh\n\n/bin/mount /dev/sde1 ' +
 | 
				
			||||||
 | 
					                  getNeoLocation() + '  \n\nexit 0')
 | 
				
			||||||
        out.close()
 | 
					        out.close()
 | 
				
			||||||
    elif getLocationMultiboot() == '/dev/sdf1':
 | 
					    elif getLocationMultiboot() == '/dev/sdf1':
 | 
				
			||||||
        out = open('' + LinkNeoBoot + '/files/neo.sh', 'w')
 | 
					        out = open('' + LinkNeoBoot + '/files/neo.sh', 'w')
 | 
				
			||||||
                    out.write('#!/bin/sh\n\n/bin/mount /dev/sdf1 ' + getNeoLocation() + '  \n\nexit 0')
 | 
					        out.write('#!/bin/sh\n\n/bin/mount /dev/sdf1 ' +
 | 
				
			||||||
 | 
					                  getNeoLocation() + '  \n\nexit 0')
 | 
				
			||||||
        out.close()
 | 
					        out.close()
 | 
				
			||||||
    elif getLocationMultiboot() == '/dev/sdg1':
 | 
					    elif getLocationMultiboot() == '/dev/sdg1':
 | 
				
			||||||
        out = open('' + LinkNeoBoot + '/files/neo.sh', 'w')
 | 
					        out = open('' + LinkNeoBoot + '/files/neo.sh', 'w')
 | 
				
			||||||
                    out.write('#!/bin/sh\n\n/bin/mount /dev/sdg1 ' + getNeoLocation() + '  \n\nexit 0')
 | 
					        out.write('#!/bin/sh\n\n/bin/mount /dev/sdg1 ' +
 | 
				
			||||||
 | 
					                  getNeoLocation() + '  \n\nexit 0')
 | 
				
			||||||
        out.close()
 | 
					        out.close()
 | 
				
			||||||
    elif getLocationMultiboot() == '/dev/sdh1':
 | 
					    elif getLocationMultiboot() == '/dev/sdh1':
 | 
				
			||||||
        out = open('' + LinkNeoBoot + '/files/neo.sh', 'w')
 | 
					        out = open('' + LinkNeoBoot + '/files/neo.sh', 'w')
 | 
				
			||||||
                    out.write('#!/bin/sh\n\n/bin/mount /dev/sdh1 ' + getNeoLocation() + '  \n\nexit 0')
 | 
					        out.write('#!/bin/sh\n\n/bin/mount /dev/sdh1 ' +
 | 
				
			||||||
 | 
					                  getNeoLocation() + '  \n\nexit 0')
 | 
				
			||||||
        out.close()
 | 
					        out.close()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    os.system('chmod 755 ' + LinkNeoBoot + '/files/neo.sh')
 | 
					    os.system('chmod 755 ' + LinkNeoBoot + '/files/neo.sh')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getMountPointNeo2():
 | 
					def getMountPointNeo2():
 | 
				
			||||||
        #---------------------------------------------
 | 
					    # ---------------------------------------------
 | 
				
			||||||
        os.system('touch ' + LinkNeoBoot + '/files/mountpoint.sh; echo "#!/bin/sh"  > ' + LinkNeoBoot + '/files/mountpoint.sh; chmod 0755 ' + 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':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        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':
 | 
					    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('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':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sdf1 /media/usb"  >> ' +
 | 
				
			||||||
 | 
					                  LinkNeoBoot + '/files/mountpoint.sh')
 | 
				
			||||||
    elif getNeoMount2() == 'usb_install_/dev/sdg1':
 | 
					    elif getNeoMount2() == 'usb_install_/dev/sdg1':
 | 
				
			||||||
                    os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sdg1 /media/usb"  >> ' + LinkNeoBoot + '/files/mountpoint.sh')
 | 
					        os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sdg1 /media/usb"  >> ' +
 | 
				
			||||||
 | 
					                  LinkNeoBoot + '/files/mountpoint.sh')
 | 
				
			||||||
    elif getNeoMount2() == 'usb_install_/dev/sdh1':
 | 
					    elif getNeoMount2() == 'usb_install_/dev/sdh1':
 | 
				
			||||||
                    os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sdh1 /media/usb"  >> ' + LinkNeoBoot + '/files/mountpoint.sh')
 | 
					        os.system('echo "umount -l /media/usb\nmkdir -p /media/usb\n/bin/mount /dev/sdh1 /media/usb"  >> ' +
 | 
				
			||||||
        #---------------------------------------------
 | 
					                  LinkNeoBoot + '/files/mountpoint.sh')
 | 
				
			||||||
 | 
					    # ---------------------------------------------
 | 
				
			||||||
    elif getNeoMount3() == 'cf_install_/dev/sda1':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        os.system('echo "umount -l /media/cf\nmkdir -p /media/cf\n/bin/mount /dev/sdb1 /media/cf"  >> ' +
 | 
				
			||||||
        #---------------------------------------------
 | 
					                  LinkNeoBoot + '/files/mountpoint.sh')
 | 
				
			||||||
 | 
					    # ---------------------------------------------
 | 
				
			||||||
    elif getNeoMount4() == 'card_install_/dev/sda1':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        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':
 | 
					    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')
 | 
					        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':
 | 
					    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 "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')
 | 
					    os.system('echo "\n\nexit 0"  >> ' + LinkNeoBoot + '/files/mountpoint.sh')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getBoxMacAddres():
 | 
					def getBoxMacAddres():
 | 
				
			||||||
    ethernetmac = 'UNKNOWN'
 | 
					    ethernetmac = 'UNKNOWN'
 | 
				
			||||||
    if not fileExists('/etc/.nameneo'):
 | 
					    if not fileExists('/etc/.nameneo'):
 | 
				
			||||||
@@ -1058,20 +1113,22 @@ def getBoxMacAddres():
 | 
				
			|||||||
            ethernetmac = f.readline().strip()
 | 
					            ethernetmac = f.readline().strip()
 | 
				
			||||||
            f.close()
 | 
					            f.close()
 | 
				
			||||||
            os.system('cp -r /etc/.nameneo /tmp/.mymac')
 | 
					            os.system('cp -r /etc/.nameneo /tmp/.mymac')
 | 
				
			||||||
        #return ethernetmac
 | 
					        # return ethernetmac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    elif fileExists('/tmp/.mymac'):
 | 
					    elif fileExists('/tmp/.mymac'):
 | 
				
			||||||
        f = open("/tmp/.mymac", 'r')
 | 
					        f = open("/tmp/.mymac", 'r')
 | 
				
			||||||
                    myboxmac = f.readline().strip().replace("eth0      Link encap:Ethernet  HWaddr ", "")
 | 
					        myboxmac = f.readline().strip().replace(
 | 
				
			||||||
 | 
					            "eth0      Link encap:Ethernet  HWaddr ", "")
 | 
				
			||||||
        f.close()
 | 
					        f.close()
 | 
				
			||||||
        ethernetmac = myboxmac
 | 
					        ethernetmac = myboxmac
 | 
				
			||||||
                    writefile = open('/tmp/.mymac' , 'w')
 | 
					        writefile = open('/tmp/.mymac', 'w')
 | 
				
			||||||
        writefile.write(myboxmac)
 | 
					        writefile.write(myboxmac)
 | 
				
			||||||
        writefile.close()
 | 
					        writefile.close()
 | 
				
			||||||
    elif not fileExists('/tmp/.mymac'):
 | 
					    elif not fileExists('/tmp/.mymac'):
 | 
				
			||||||
        ethernetmac = '12:34:56:78:91:02'
 | 
					        ethernetmac = '12:34:56:78:91:02'
 | 
				
			||||||
    return ethernetmac
 | 
					    return ethernetmac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getCheckActivateVip():
 | 
					def getCheckActivateVip():
 | 
				
			||||||
    supportedvip = ''
 | 
					    supportedvip = ''
 | 
				
			||||||
    if os.path.exists('/usr/lib/periodon/.activatedmac'):
 | 
					    if os.path.exists('/usr/lib/periodon/.activatedmac'):
 | 
				
			||||||
@@ -1082,6 +1139,7 @@ def getCheckActivateVip():
 | 
				
			|||||||
            supportedvip = '%s' % getBoxMacAddres()
 | 
					            supportedvip = '%s' % getBoxMacAddres()
 | 
				
			||||||
    return supportedvip
 | 
					    return supportedvip
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getMountDiskSTB():
 | 
					def getMountDiskSTB():
 | 
				
			||||||
    neo_disk = ' '
 | 
					    neo_disk = ' '
 | 
				
			||||||
    if os.path.exists('/proc/mounts'):
 | 
					    if os.path.exists('/proc/mounts'):
 | 
				
			||||||
@@ -1089,49 +1147,70 @@ def getMountDiskSTB():
 | 
				
			|||||||
            lines = f.read()
 | 
					            lines = f.read()
 | 
				
			||||||
            f.close()
 | 
					            f.close()
 | 
				
			||||||
        if lines.find('/dev/sda1 /media/hdd') != -1:
 | 
					        if lines.find('/dev/sda1 /media/hdd') != -1:
 | 
				
			||||||
            os.system('touch /tmp/disk/sda1; touch /tmp/disk/#---Select_the_disk_HDD:')            
 | 
					            os.system(
 | 
				
			||||||
 | 
					                'touch /tmp/disk/sda1; touch /tmp/disk/#---Select_the_disk_HDD:')
 | 
				
			||||||
        if lines.find('/dev/sdb1 /media/hdd') != -1:
 | 
					        if lines.find('/dev/sdb1 /media/hdd') != -1:
 | 
				
			||||||
            os.system('touch /tmp/disk/sdb1; touch /tmp/disk/#---Select_the_disk_HDD:')            
 | 
					            os.system(
 | 
				
			||||||
 | 
					                'touch /tmp/disk/sdb1; touch /tmp/disk/#---Select_the_disk_HDD:')
 | 
				
			||||||
        if lines.find('/dev/sda2 /media/hdd') != -1:
 | 
					        if lines.find('/dev/sda2 /media/hdd') != -1:
 | 
				
			||||||
            os.system('touch /tmp/disk/sda2; touch /tmp/disk/#---Select_the_disk_HDD:')            
 | 
					            os.system(
 | 
				
			||||||
 | 
					                'touch /tmp/disk/sda2; touch /tmp/disk/#---Select_the_disk_HDD:')
 | 
				
			||||||
        if lines.find('/dev/sdb2 /media/hdd') != -1:
 | 
					        if lines.find('/dev/sdb2 /media/hdd') != -1:
 | 
				
			||||||
            os.system('touch /tmp/disk/sdb2; touch /tmp/disk/#---Select_the_disk_HDD:')            
 | 
					            os.system(
 | 
				
			||||||
 | 
					                'touch /tmp/disk/sdb2; touch /tmp/disk/#---Select_the_disk_HDD:')
 | 
				
			||||||
        if lines.find('/dev/sdc1 /media/hdd') != -1:
 | 
					        if lines.find('/dev/sdc1 /media/hdd') != -1:
 | 
				
			||||||
            os.system('touch /tmp/disk/sdc1; touch /tmp/disk/#---Select_the_disk_HDD:')            
 | 
					            os.system(
 | 
				
			||||||
 | 
					                'touch /tmp/disk/sdc1; touch /tmp/disk/#---Select_the_disk_HDD:')
 | 
				
			||||||
        if lines.find('/dev/sdd1 /media/hdd') != -1:
 | 
					        if lines.find('/dev/sdd1 /media/hdd') != -1:
 | 
				
			||||||
            os.system('touch /tmp/disk/sdd1; touch /tmp/disk/#---Select_the_disk_HDD:')            
 | 
					            os.system(
 | 
				
			||||||
 | 
					                'touch /tmp/disk/sdd1; touch /tmp/disk/#---Select_the_disk_HDD:')
 | 
				
			||||||
        if lines.find('/dev/sde1 /media/hdd') != -1:
 | 
					        if lines.find('/dev/sde1 /media/hdd') != -1:
 | 
				
			||||||
            os.system('touch /tmp/disk/sde1; touch /tmp/disk/#---Select_the_disk_HDD:')            
 | 
					            os.system(
 | 
				
			||||||
 | 
					                'touch /tmp/disk/sde1; touch /tmp/disk/#---Select_the_disk_HDD:')
 | 
				
			||||||
        if lines.find('/dev/sdf1 /media/hdd') != -1:
 | 
					        if lines.find('/dev/sdf1 /media/hdd') != -1:
 | 
				
			||||||
            os.system('touch /tmp/disk/sdf1; touch /tmp/disk/#---Select_the_disk_HDD:')
 | 
					            os.system(
 | 
				
			||||||
 | 
					                'touch /tmp/disk/sdf1; touch /tmp/disk/#---Select_the_disk_HDD:')
 | 
				
			||||||
        if lines.find('/dev/sdg1 /media/hdd') != -1:
 | 
					        if lines.find('/dev/sdg1 /media/hdd') != -1:
 | 
				
			||||||
            os.system('touch /tmp/disk/sdg1; touch /tmp/disk/#---Select_the_disk_HDD:') 
 | 
					            os.system(
 | 
				
			||||||
 | 
					                'touch /tmp/disk/sdg1; touch /tmp/disk/#---Select_the_disk_HDD:')
 | 
				
			||||||
        if lines.find('/dev/sdh1 /media/hdd') != -1:
 | 
					        if lines.find('/dev/sdh1 /media/hdd') != -1:
 | 
				
			||||||
            os.system('touch /tmp/disk/sdh1; touch /tmp/disk/#---Select_the_disk_HDD:')
 | 
					            os.system(
 | 
				
			||||||
	#---------------------------------------------
 | 
					                'touch /tmp/disk/sdh1; touch /tmp/disk/#---Select_the_disk_HDD:')
 | 
				
			||||||
 | 
					        # ---------------------------------------------
 | 
				
			||||||
        if lines.find('/dev/sda1 /media/usb') != -1:
 | 
					        if lines.find('/dev/sda1 /media/usb') != -1:
 | 
				
			||||||
            os.system('touch /tmp/disk/sda1; touch /tmp/disk/#---Select_the_disk_USB:')            
 | 
					            os.system(
 | 
				
			||||||
 | 
					                'touch /tmp/disk/sda1; touch /tmp/disk/#---Select_the_disk_USB:')
 | 
				
			||||||
        if lines.find('/dev/sdb1 /media/usb') != -1:
 | 
					        if lines.find('/dev/sdb1 /media/usb') != -1:
 | 
				
			||||||
            os.system('touch /tmp/disk/sdb1; touch /tmp/disk/#---Select_the_disk_USB:')            
 | 
					            os.system(
 | 
				
			||||||
 | 
					                'touch /tmp/disk/sdb1; touch /tmp/disk/#---Select_the_disk_USB:')
 | 
				
			||||||
        if lines.find('/dev/sda2 /media/usb') != -1:
 | 
					        if lines.find('/dev/sda2 /media/usb') != -1:
 | 
				
			||||||
            os.system('touch /tmp/disk/sda2; touch /tmp/disk/#---Select_the_disk_USB:')            
 | 
					            os.system(
 | 
				
			||||||
 | 
					                'touch /tmp/disk/sda2; touch /tmp/disk/#---Select_the_disk_USB:')
 | 
				
			||||||
        if lines.find('/dev/sdb2 /media/usb') != -1:
 | 
					        if lines.find('/dev/sdb2 /media/usb') != -1:
 | 
				
			||||||
            os.system('touch /tmp/disk/sdb2; touch /tmp/disk/#---Select_the_disk_USB:')            
 | 
					            os.system(
 | 
				
			||||||
 | 
					                'touch /tmp/disk/sdb2; touch /tmp/disk/#---Select_the_disk_USB:')
 | 
				
			||||||
        if lines.find('/dev/sdc1 /media/usb') != -1:
 | 
					        if lines.find('/dev/sdc1 /media/usb') != -1:
 | 
				
			||||||
            os.system('touch /tmp/disk/sdc1; touch /tmp/disk/#---Select_the_disk_USB:')            
 | 
					            os.system(
 | 
				
			||||||
 | 
					                'touch /tmp/disk/sdc1; touch /tmp/disk/#---Select_the_disk_USB:')
 | 
				
			||||||
        if lines.find('/dev/sdd1 /media/usb') != -1:
 | 
					        if lines.find('/dev/sdd1 /media/usb') != -1:
 | 
				
			||||||
            os.system('touch /tmp/disk/sdd1; touch /tmp/disk/#---Select_the_disk_USB:')            
 | 
					            os.system(
 | 
				
			||||||
 | 
					                'touch /tmp/disk/sdd1; touch /tmp/disk/#---Select_the_disk_USB:')
 | 
				
			||||||
        if lines.find('/dev/sde1 /media/usb') != -1:
 | 
					        if lines.find('/dev/sde1 /media/usb') != -1:
 | 
				
			||||||
            os.system('touch /tmp/disk/sde1; touch /tmp/disk/#---Select_the_disk_USB:')            
 | 
					            os.system(
 | 
				
			||||||
 | 
					                'touch /tmp/disk/sde1; touch /tmp/disk/#---Select_the_disk_USB:')
 | 
				
			||||||
        if lines.find('/dev/sdf1 /media/usb') != -1:
 | 
					        if lines.find('/dev/sdf1 /media/usb') != -1:
 | 
				
			||||||
            os.system('touch /tmp/disk/sdf1; touch /tmp/disk/#---Select_the_disk_USB:')
 | 
					            os.system(
 | 
				
			||||||
 | 
					                'touch /tmp/disk/sdf1; touch /tmp/disk/#---Select_the_disk_USB:')
 | 
				
			||||||
        if lines.find('/dev/sdg1 /media/usb') != -1:
 | 
					        if lines.find('/dev/sdg1 /media/usb') != -1:
 | 
				
			||||||
            os.system('touch /tmp/disk/sdg1; touch /tmp/disk/#---Select_the_disk_USB:')
 | 
					            os.system(
 | 
				
			||||||
 | 
					                'touch /tmp/disk/sdg1; touch /tmp/disk/#---Select_the_disk_USB:')
 | 
				
			||||||
        if lines.find('/dev/sdh1 /media/usb') != -1:
 | 
					        if lines.find('/dev/sdh1 /media/usb') != -1:
 | 
				
			||||||
            os.system('touch /tmp/disk/sdh1; touch /tmp/disk/#---Select_the_disk_USB:')	
 | 
					            os.system(
 | 
				
			||||||
 | 
					                'touch /tmp/disk/sdh1; touch /tmp/disk/#---Select_the_disk_USB:')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return neo_disk
 | 
					    return neo_disk
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getCheckExtDisk():
 | 
					def getCheckExtDisk():
 | 
				
			||||||
    os.system("cat /proc/mounts | egrep -o '.ext.' | sort | uniq > /tmp/.myext")
 | 
					    os.system("cat /proc/mounts | egrep -o '.ext.' | sort | uniq > /tmp/.myext")
 | 
				
			||||||
    if os.path.exists('/tmp/.myext'):
 | 
					    if os.path.exists('/tmp/.myext'):
 | 
				
			||||||
@@ -1140,6 +1219,7 @@ def getCheckExtDisk():
 | 
				
			|||||||
            f.close()
 | 
					            f.close()
 | 
				
			||||||
    return myboxEXT
 | 
					    return myboxEXT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getCheckExt():
 | 
					def getCheckExt():
 | 
				
			||||||
    neoExt = 'UNKNOWN'
 | 
					    neoExt = 'UNKNOWN'
 | 
				
			||||||
    if os.path.exists('/proc/mounts'):
 | 
					    if os.path.exists('/proc/mounts'):
 | 
				
			||||||
@@ -1160,6 +1240,7 @@ def getCheckExt():
 | 
				
			|||||||
            neoExt = 'ext4'
 | 
					            neoExt = 'ext4'
 | 
				
			||||||
    return neoExt
 | 
					    return neoExt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getExtCheckHddUsb():
 | 
					def getExtCheckHddUsb():
 | 
				
			||||||
    neoExt = 'UNKNOWN'
 | 
					    neoExt = 'UNKNOWN'
 | 
				
			||||||
    if os.path.exists('/proc/mounts'):
 | 
					    if os.path.exists('/proc/mounts'):
 | 
				
			||||||
@@ -1172,6 +1253,7 @@ def getExtCheckHddUsb():
 | 
				
			|||||||
            neoExt = 'ext4'
 | 
					            neoExt = 'ext4'
 | 
				
			||||||
    return neoExt
 | 
					    return neoExt
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getNandWrite():
 | 
					def getNandWrite():
 | 
				
			||||||
    NandWrite = 'NandWrite'
 | 
					    NandWrite = 'NandWrite'
 | 
				
			||||||
    if fileExists('/usr/lib/python2.7'):
 | 
					    if fileExists('/usr/lib/python2.7'):
 | 
				
			||||||
@@ -1186,9 +1268,11 @@ def getNandWrite():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return NandWrite
 | 
					    return NandWrite
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getMyUUID():
 | 
					def getMyUUID():
 | 
				
			||||||
    #os.system("tune2fs -l /dev/sd?? | awk '/UUID/ {print $NF}' > /tmp/.myuuid")
 | 
					    # os.system("tune2fs -l /dev/sd?? | awk '/UUID/ {print $NF}' > /tmp/.myuuid")
 | 
				
			||||||
    os.system("tune2fs -l %s | awk '/UUID/ {print $NF}' > /tmp/.myuuid" % (getLocationMultiboot()))
 | 
					    os.system(
 | 
				
			||||||
 | 
					        "tune2fs -l %s | awk '/UUID/ {print $NF}' > /tmp/.myuuid" % (getLocationMultiboot()))
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        if os.path.isfile('/tmp/.myuuid'):
 | 
					        if os.path.isfile('/tmp/.myuuid'):
 | 
				
			||||||
            return open('/tmp/.myuuid').read().strip().upper()
 | 
					            return open('/tmp/.myuuid').read().strip().upper()
 | 
				
			||||||
@@ -1197,14 +1281,16 @@ def getMyUUID():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    return _('unavailable')
 | 
					    return _('unavailable')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getImageBootNow():
 | 
					def getImageBootNow():
 | 
				
			||||||
    imagefile = 'UNKNOWN'
 | 
					    imagefile = 'UNKNOWN'
 | 
				
			||||||
    if os.path.exists('/.multinfo'):
 | 
					    if os.path.exists('/.multinfo'):
 | 
				
			||||||
        with open('/.multinfo' , 'r') as f:
 | 
					        with open('/.multinfo', 'r') as f:
 | 
				
			||||||
            imagefile = f.readline().strip()
 | 
					            imagefile = f.readline().strip()
 | 
				
			||||||
            f.close()
 | 
					            f.close()
 | 
				
			||||||
    return imagefile
 | 
					    return imagefile
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getNeoActivatedtest():
 | 
					def getNeoActivatedtest():
 | 
				
			||||||
    neoactivated = 'NEOBOOT MULTIBOOT'
 | 
					    neoactivated = 'NEOBOOT MULTIBOOT'
 | 
				
			||||||
    if not fileExists('/.multinfo'):
 | 
					    if not fileExists('/.multinfo'):
 | 
				
			||||||
@@ -1212,12 +1298,13 @@ def getNeoActivatedtest():
 | 
				
			|||||||
            neoactivated = 'Ethernet MAC not found.'
 | 
					            neoactivated = 'Ethernet MAC not found.'
 | 
				
			||||||
        elif not fileExists('/usr/lib/periodon/.kodn'):
 | 
					        elif not fileExists('/usr/lib/periodon/.kodn'):
 | 
				
			||||||
            neoactivated = 'VIP Pin code missing.'
 | 
					            neoactivated = 'VIP Pin code missing.'
 | 
				
			||||||
            elif getTestToTest() != UPDATEVERSION :
 | 
					        elif getTestToTest() != UPDATEVERSION:
 | 
				
			||||||
            neoactivated = _('Update %s is available.') % getTestToTest()
 | 
					            neoactivated = _('Update %s is available.') % getTestToTest()
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
                if getCheckActivateVip() == getBoxMacAddres() and fileExists('/usr/lib/periodon/.kodn') and getTestToTest() == UPDATEVERSION :
 | 
					            if getCheckActivateVip() == getBoxMacAddres() and fileExists('/usr/lib/periodon/.kodn') and getTestToTest() == UPDATEVERSION:
 | 
				
			||||||
                neoactivated = 'NEOBOOT VIP ACTIVATED'
 | 
					                neoactivated = 'NEOBOOT VIP ACTIVATED'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return neoactivated
 | 
					    return neoactivated
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
boxbrand = sys.modules[__name__]
 | 
					boxbrand = sys.modules[__name__]
 | 
				
			||||||
 
 | 
				
			|||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -4,7 +4,7 @@ from Components.Pixmap import Pixmap
 | 
				
			|||||||
import os
 | 
					import os
 | 
				
			||||||
# biko73 = ./neoskins/biko/skin_biko73.py
 | 
					# biko73 = ./neoskins/biko/skin_biko73.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### ImageChooseFULLHD  - biko73
 | 
					# ImageChooseFULLHD  - biko73
 | 
				
			||||||
ImageChooseFULLHD = """
 | 
					ImageChooseFULLHD = """
 | 
				
			||||||
<screen name="NeoBootImageChoose" position="center,center" size="1920,1080" title=" " flags="wfNoBorder" backgroundColor="transparent">
 | 
					<screen name="NeoBootImageChoose" position="center,center" size="1920,1080" title=" " flags="wfNoBorder" backgroundColor="transparent">
 | 
				
			||||||
  <widget name="progreso" position="627,590" size="452,10" borderWidth="1" zPosition="3" />    
 | 
					  <widget name="progreso" position="627,590" size="452,10" borderWidth="1" zPosition="3" />    
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ from Components.Pixmap import Pixmap
 | 
				
			|||||||
import os
 | 
					import os
 | 
				
			||||||
# biko73 = ./neoskins/biko/skin_biko73.py
 | 
					# biko73 = ./neoskins/biko/skin_biko73.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### ImageChooseFULLHD  - biko73
 | 
					# ImageChooseFULLHD  - biko73
 | 
				
			||||||
ImageChooseFULLHD = """
 | 
					ImageChooseFULLHD = """
 | 
				
			||||||
<screen name="NeoBootImageChoose" position="center,center" size="1920,1080" title=" " flags="wfNoBorder" backgroundColor="transparent">
 | 
					<screen name="NeoBootImageChoose" position="center,center" size="1920,1080" title=" " flags="wfNoBorder" backgroundColor="transparent">
 | 
				
			||||||
  <widget name="progreso" position="560,525" size="450,10" borderWidth="1" zPosition="3" />
 | 
					  <widget name="progreso" position="560,525" size="450,10" borderWidth="1" zPosition="3" />
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ from Screens.Screen import Screen
 | 
				
			|||||||
from Components.Pixmap import Pixmap
 | 
					from Components.Pixmap import Pixmap
 | 
				
			||||||
import os
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### ImageChooseFULLHD                      
 | 
					# ImageChooseFULLHD
 | 
				
			||||||
ImageChooseFULLHD = """
 | 
					ImageChooseFULLHD = """
 | 
				
			||||||
	 <screen name="NeoBootImageChoose" position="center,center" size="1920,1080" title="NeoBoot" flags="wfNoBorder" backgroundColor="background" transparent="0">
 | 
						 <screen name="NeoBootImageChoose" position="center,center" size="1920,1080" title="NeoBoot" flags="wfNoBorder" backgroundColor="background" transparent="0">
 | 
				
			||||||
	 		  <ePixmap position="0,0" zPosition="-10" size="1920,1080" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/neoskins/cobaltfhd/channel.png" transparent="1" />
 | 
						 		  <ePixmap position="0,0" zPosition="-10" size="1920,1080" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/neoskins/cobaltfhd/channel.png" transparent="1" />
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ from Components.Pixmap import Pixmap
 | 
				
			|||||||
import os
 | 
					import os
 | 
				
			||||||
# darog69 = ./neoskins/darog69/skin_darog69.py
 | 
					# darog69 = ./neoskins/darog69/skin_darog69.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### ImageChooseFULLHD  - darog69
 | 
					# ImageChooseFULLHD  - darog69
 | 
				
			||||||
ImageChooseFULLHD = """
 | 
					ImageChooseFULLHD = """
 | 
				
			||||||
<screen name="NeoBootImageChoose" position="center,center" size="1920,1080" title=" " flags="wfNoBorder" backgroundColor="transparent">
 | 
					<screen name="NeoBootImageChoose" position="center,center" size="1920,1080" title=" " flags="wfNoBorder" backgroundColor="transparent">
 | 
				
			||||||
  <widget name="progreso" position="594,590" size="530,10" borderWidth="1" zPosition="3" />
 | 
					  <widget name="progreso" position="594,590" size="530,10" borderWidth="1" zPosition="3" />
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ from Components.Pixmap import Pixmap
 | 
				
			|||||||
import os
 | 
					import os
 | 
				
			||||||
# darog69 = ./neoskins/darog69_Ustym4kpro/skin_darog69_Ustym4kpro.py
 | 
					# darog69 = ./neoskins/darog69_Ustym4kpro/skin_darog69_Ustym4kpro.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### ImageChooseFULLHD  - darog69_Ustym4kpro
 | 
					# ImageChooseFULLHD  - darog69_Ustym4kpro
 | 
				
			||||||
ImageChooseFULLHD = """
 | 
					ImageChooseFULLHD = """
 | 
				
			||||||
<screen name="NeoBootImageChoose" position="center,center" size="1920,1080" title=" " flags="wfNoBorder" backgroundColor="transparent">
 | 
					<screen name="NeoBootImageChoose" position="center,center" size="1920,1080" title=" " flags="wfNoBorder" backgroundColor="transparent">
 | 
				
			||||||
  <widget name="progreso" position="595,590" size="530,15" borderWidth="1" zPosition="3" />
 | 
					  <widget name="progreso" position="595,590" size="530,15" borderWidth="1" zPosition="3" />
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,17 +4,17 @@ from Screens.Screen import Screen
 | 
				
			|||||||
from Components.Pixmap import Pixmap
 | 
					from Components.Pixmap import Pixmap
 | 
				
			||||||
import os
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#Colors (#AARRGGBB)
 | 
					# Colors (#AARRGGBB)
 | 
				
			||||||
#____Recommended colors - Zalecane kolory :
 | 
					# ____Recommended colors - Zalecane kolory :
 | 
				
			||||||
#color name="white" value="#ffffff"
 | 
					# color name="white" value="#ffffff"
 | 
				
			||||||
#color name="darkwhite" value="#00dddddd"
 | 
					# color name="darkwhite" value="#00dddddd"
 | 
				
			||||||
#color name="red" value="#f23d21"
 | 
					# color name="red" value="#f23d21"
 | 
				
			||||||
#color name="green" value="#389416"
 | 
					# color name="green" value="#389416"
 | 
				
			||||||
#color name="blue" value="#0064c7"
 | 
					# color name="blue" value="#0064c7"
 | 
				
			||||||
#color name="yellow" value="#bab329"
 | 
					# color name="yellow" value="#bab329"
 | 
				
			||||||
#color name="orange" value="#00ffa500"
 | 
					# color name="orange" value="#00ffa500"
 | 
				
			||||||
#color name="gray" value="#808080"
 | 
					# color name="gray" value="#808080"
 | 
				
			||||||
#color name="lightgrey" value="#009b9b9b"
 | 
					# color name="lightgrey" value="#009b9b9b"
 | 
				
			||||||
#        green = '#00389416' lub #00389416
 | 
					#        green = '#00389416' lub #00389416
 | 
				
			||||||
#        red = '#00ff2525'
 | 
					#        red = '#00ff2525'
 | 
				
			||||||
#        yellow = '#00ffe875'
 | 
					#        yellow = '#00ffe875'
 | 
				
			||||||
@@ -23,14 +23,14 @@ import os
 | 
				
			|||||||
#   jasny-blue  =  #99FFFF
 | 
					#   jasny-blue  =  #99FFFF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Zamiast font=Regular ktory nie rozpoznaje polskich znakow np. na VTi, mozesz zmienic na ponizsze font="*:
 | 
					# Zamiast font=Regular ktory nie rozpoznaje polskich znakow np. na VTi, mozesz zmienic na ponizsze font="*:
 | 
				
			||||||
    #   font -  genel
 | 
					#   font -  genel
 | 
				
			||||||
    #   font -  baslk
 | 
					#   font -  baslk
 | 
				
			||||||
    #   font -  tasat
 | 
					#   font -  tasat
 | 
				
			||||||
    #   font -  dugme
 | 
					#   font -  dugme
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#  <widget name="config" position="1177,256" size="703,717" itemHeight="43" font="genel;30" scrollbarMode="showOnDemand" foregroundColor="#00FFFFFF" backgroundColor="#1A0F0F0F" foregroundColorSelected="#00FFFFF" backgroundColorSelected="#1A27408B" scrollbarSliderBorderWidth="1" scrollbarWidth="8" scrollbarSliderForegroundColor="#00FFFFFF" scrollbarSliderBorderColor="#0027408B" enableWrapAround="1" transparent="1" />
 | 
					#  <widget name="config" position="1177,256" size="703,717" itemHeight="43" font="genel;30" scrollbarMode="showOnDemand" foregroundColor="#00FFFFFF" backgroundColor="#1A0F0F0F" foregroundColorSelected="#00FFFFF" backgroundColorSelected="#1A27408B" scrollbarSliderBorderWidth="1" scrollbarWidth="8" scrollbarSliderForegroundColor="#00FFFFFF" scrollbarSliderBorderColor="#0027408B" enableWrapAround="1" transparent="1" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###____ Skin Ultra HD - ImageChooseFULLHD   ___ mod. gutosie___
 | 
					# ____ Skin Ultra HD - ImageChooseFULLHD   ___ mod. gutosie___
 | 
				
			||||||
ImageChooseFULLHD = """
 | 
					ImageChooseFULLHD = """
 | 
				
			||||||
<screen name="ImageChooseFULLHD" position="center,center" size="1920,1080" title=" " flags="wfNoBorder" backgroundColor="transparent">
 | 
					<screen name="ImageChooseFULLHD" position="center,center" size="1920,1080" title=" " flags="wfNoBorder" backgroundColor="transparent">
 | 
				
			||||||
  <eLabel backgroundColor="black" font="dugme; 30" foregroundColor="#99FFFF" position="70,50" size="298,55" valign="center" text="NEOBoot Multi-image" transparent="1" />
 | 
					  <eLabel backgroundColor="black" font="dugme; 30" foregroundColor="#99FFFF" position="70,50" size="298,55" valign="center" text="NEOBoot Multi-image" transparent="1" />
 | 
				
			||||||
@@ -88,7 +88,7 @@ ImageChooseFULLHD = """
 | 
				
			|||||||
"""
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###____ Skin Ultra HD - ImageChooseULTRAHD ___ mod. gutosie___
 | 
					# ____ Skin Ultra HD - ImageChooseULTRAHD ___ mod. gutosie___
 | 
				
			||||||
ImageChooseULTRAHD = """
 | 
					ImageChooseULTRAHD = """
 | 
				
			||||||
<screen name="NeoBootImageChoose" position="0,0" size="3840,2160" flags="wfNoBorder" backgroundColor="#ff111111">
 | 
					<screen name="NeoBootImageChoose" position="0,0" size="3840,2160" flags="wfNoBorder" backgroundColor="#ff111111">
 | 
				
			||||||
  <widget source="Title" render="Label" position="174,108" size="1575,150" font="baslk;102" valign="bottom" foregroundColor="#00FFFFFF" backgroundColor="#1A0F0F0F" noWrap="1" transparent="1" />
 | 
					  <widget source="Title" render="Label" position="174,108" size="1575,150" font="baslk;102" valign="bottom" foregroundColor="#00FFFFFF" backgroundColor="#1A0F0F0F" noWrap="1" transparent="1" />
 | 
				
			||||||
@@ -137,7 +137,7 @@ ImageChooseULTRAHD = """
 | 
				
			|||||||
</screen>"""
 | 
					</screen>"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###____ Skin HD - ImageChoose ___mod. gutosie ___
 | 
					# ____ Skin HD - ImageChoose ___mod. gutosie ___
 | 
				
			||||||
ImageChooseHD = """
 | 
					ImageChooseHD = """
 | 
				
			||||||
<screen name="NeoBootImageChoose" position="0,0" size="1280,720" flags="wfNoBorder" backgroundColor="#ff111111">\n
 | 
					<screen name="NeoBootImageChoose" position="0,0" size="1280,720" flags="wfNoBorder" backgroundColor="#ff111111">\n
 | 
				
			||||||
                <widget source="Title" render="Label" position="58,36" size="712,50" font="baslk;28" valign="bottom" foregroundColor="#00FFFFFF" backgroundColor="#1A0F0F0F" noWrap="1" transparent="1" />\n
 | 
					                <widget source="Title" render="Label" position="58,36" size="712,50" font="baslk;28" valign="bottom" foregroundColor="#00FFFFFF" backgroundColor="#1A0F0F0F" noWrap="1" transparent="1" />\n
 | 
				
			||||||
@@ -189,7 +189,7 @@ ImageChooseHD = """
 | 
				
			|||||||
"""
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###____ Skin FULLHD - MyUpgradeFULLHD ___mod. gutosie ___
 | 
					# ____ Skin FULLHD - MyUpgradeFULLHD ___mod. gutosie ___
 | 
				
			||||||
MyUpgradeFULLHD = """
 | 
					MyUpgradeFULLHD = """
 | 
				
			||||||
<screen name="MyUpgradeFULLHD" position="center,center" size="1380,570" title="Tools Neoboot">
 | 
					<screen name="MyUpgradeFULLHD" position="center,center" size="1380,570" title="Tools Neoboot">
 | 
				
			||||||
                  <ePixmap position="594,255" zPosition="-2" size="623,313" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrix.png" />
 | 
					                  <ePixmap position="594,255" zPosition="-2" size="623,313" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrix.png" />
 | 
				
			||||||
@@ -208,7 +208,7 @@ MyUpgradeFULLHD = """
 | 
				
			|||||||
                </screen>"""
 | 
					                </screen>"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###____ Skin UltraHD - MyUpgradeUltraHD ___mod. gutosie ___
 | 
					# ____ Skin UltraHD - MyUpgradeUltraHD ___mod. gutosie ___
 | 
				
			||||||
MyUpgradeUltraHD = """
 | 
					MyUpgradeUltraHD = """
 | 
				
			||||||
<screen name="MyUpgradeUltraHD" position="center,center" size="2100,1020" flags="wfNoBorder" backgroundColor="#ff111111">
 | 
					<screen name="MyUpgradeUltraHD" position="center,center" size="2100,1020" flags="wfNoBorder" backgroundColor="#ff111111">
 | 
				
			||||||
        <widget name="label1" position="180,210" size="1740,78" font="genel;60" halign="center" foregroundColor="#00FFFFFF" backgroundColor="#1A0F0F0F" zPosition="1" transparent="1" />
 | 
					        <widget name="label1" position="180,210" size="1740,78" font="genel;60" halign="center" foregroundColor="#00FFFFFF" backgroundColor="#1A0F0F0F" zPosition="1" transparent="1" />
 | 
				
			||||||
@@ -225,7 +225,7 @@ MyUpgradeUltraHD = """
 | 
				
			|||||||
        </screen>"""
 | 
					        </screen>"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###____ Skin MyUpgradeHD - MyUpgradeHD ___mod. gutosie ___
 | 
					# ____ Skin MyUpgradeHD - MyUpgradeHD ___mod. gutosie ___
 | 
				
			||||||
MyUpgradeHD = """
 | 
					MyUpgradeHD = """
 | 
				
			||||||
<screen name="MyUpgradeHD" position="center,center" size="1127,569" title="Tools NeoBoot">
 | 
					<screen name="MyUpgradeHD" position="center,center" size="1127,569" title="Tools NeoBoot">
 | 
				
			||||||
                  <ePixmap position="492,223" zPosition="-2" size="589,298" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrix.png" />
 | 
					                  <ePixmap position="492,223" zPosition="-2" size="589,298" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrix.png" />
 | 
				
			||||||
@@ -244,7 +244,7 @@ MyUpgradeHD = """
 | 
				
			|||||||
                </screen>"""
 | 
					                </screen>"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###____ Skin NeoBootInstallationFULLHD - NeoBootInstallationFULLHD ___mod. gutosie ___
 | 
					# ____ Skin NeoBootInstallationFULLHD - NeoBootInstallationFULLHD ___mod. gutosie ___
 | 
				
			||||||
NeoBootInstallationFULLHD = """
 | 
					NeoBootInstallationFULLHD = """
 | 
				
			||||||
<screen name="NeoBootInstallationFULLHD" position="410,138" size="1200,850" title="NeoBoot">
 | 
					<screen name="NeoBootInstallationFULLHD" position="410,138" size="1200,850" title="NeoBoot">
 | 
				
			||||||
        <ePixmap position="643,282" zPosition="-2" size="531,331" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrix.png" />
 | 
					        <ePixmap position="643,282" zPosition="-2" size="531,331" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrix.png" />
 | 
				
			||||||
@@ -269,7 +269,7 @@ NeoBootInstallationFULLHD = """
 | 
				
			|||||||
        <widget name="key_blue" position="856,761" zPosition="1" size="326,52" font="dugme; 28" halign="center" valign="center" backgroundColor="blue" transparent="1" foregroundColor="blue" />
 | 
					        <widget name="key_blue" position="856,761" zPosition="1" size="326,52" font="dugme; 28" halign="center" valign="center" backgroundColor="blue" transparent="1" foregroundColor="blue" />
 | 
				
			||||||
        </screen>"""
 | 
					        </screen>"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###____ Skin NeoBootInstallationUltraHD - NeoBootInstallationUltraHD ___mod. gutosie ___
 | 
					# ____ Skin NeoBootInstallationUltraHD - NeoBootInstallationUltraHD ___mod. gutosie ___
 | 
				
			||||||
NeoBootInstallationUltraHD = """
 | 
					NeoBootInstallationUltraHD = """
 | 
				
			||||||
<screen name="NeoBootInstallationUltraHD" position="0,0" size="3840,2160" flags="wfNoBorder" backgroundColor="#ff111111">
 | 
					<screen name="NeoBootInstallationUltraHD" position="0,0" size="3840,2160" flags="wfNoBorder" backgroundColor="#ff111111">
 | 
				
			||||||
        <widget source="Title" render="Label" position="174,108" size="1575,150" font="baslk;102" valign="bottom" foregroundColor="#00FFFFFF" backgroundColor="#1A0F0F0F" noWrap="1" transparent="1" />
 | 
					        <widget source="Title" render="Label" position="174,108" size="1575,150" font="baslk;102" valign="bottom" foregroundColor="#00FFFFFF" backgroundColor="#1A0F0F0F" noWrap="1" transparent="1" />
 | 
				
			||||||
@@ -305,7 +305,7 @@ NeoBootInstallationUltraHD = """
 | 
				
			|||||||
        </screen>"""
 | 
					        </screen>"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###____ Skin NeoBootInstallationHD - NeoBootInstallationHD ___mod. gutosie ___
 | 
					# ____ Skin NeoBootInstallationHD - NeoBootInstallationHD ___mod. gutosie ___
 | 
				
			||||||
NeoBootInstallationHD = """
 | 
					NeoBootInstallationHD = """
 | 
				
			||||||
<screen position="center, center" size="835, 500" title="NeoBoot">
 | 
					<screen position="center, center" size="835, 500" title="NeoBoot">
 | 
				
			||||||
  <ePixmap position="0,0" zPosition="-1" size="835,500" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/frame835x500.png"  />
 | 
					  <ePixmap position="0,0" zPosition="-1" size="835,500" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/frame835x500.png"  />
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,7 +5,7 @@ import os
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# mercus = /neoskins/mercus/mercus_skin.py
 | 
					# mercus = /neoskins/mercus/mercus_skin.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### ImageChooseFULLHD  - mercus
 | 
					# ImageChooseFULLHD  - mercus
 | 
				
			||||||
ImageChooseFULLHD = """
 | 
					ImageChooseFULLHD = """
 | 
				
			||||||
<screen name="ImageChooseFULLHD" position="center,center" size="1920,1080" title=" " flags="wfNoBorder" backgroundColor="transparent">
 | 
					<screen name="ImageChooseFULLHD" position="center,center" size="1920,1080" title=" " flags="wfNoBorder" backgroundColor="transparent">
 | 
				
			||||||
  <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/test1.png" alphatest="blend" position="15,center" size="1920,1080" zPosition="-2" />
 | 
					  <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/test1.png" alphatest="blend" position="15,center" size="1920,1080" zPosition="-2" />
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,7 +5,7 @@ import os
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# skin /neoskins/matrix/matrix_skin.py - mod.gutosie
 | 
					# skin /neoskins/matrix/matrix_skin.py - mod.gutosie
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### ImageChooseFULLHD
 | 
					# ImageChooseFULLHD
 | 
				
			||||||
ImageChooseFULLHD = """
 | 
					ImageChooseFULLHD = """
 | 
				
			||||||
<screen name="NeoBootImageChoose" position="0,0" size="1920,1080" flags="wfNoBorder" backgroundColor="#ff111111">
 | 
					<screen name="NeoBootImageChoose" position="0,0" size="1920,1080" flags="wfNoBorder" backgroundColor="#ff111111">
 | 
				
			||||||
<widget source="Title" render="Label" position="97,50" size="1067,72" font="baslk;41" valign="bottom" foregroundColor="#00FFFFFF" backgroundColor="#1A0F0F0F" noWrap="1" transparent="1" />
 | 
					<widget source="Title" render="Label" position="97,50" size="1067,72" font="baslk;41" valign="bottom" foregroundColor="#00FFFFFF" backgroundColor="#1A0F0F0F" noWrap="1" transparent="1" />
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,27 +5,27 @@ from Components.Pixmap import Pixmap
 | 
				
			|||||||
import os
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#Colors (#AARRGGBB)
 | 
					# Colors (#AARRGGBB)
 | 
				
			||||||
#____Recommended colors - Zalecane kolory :
 | 
					# ____Recommended colors - Zalecane kolory :
 | 
				
			||||||
#color name="white" value="#ffffff"
 | 
					# color name="white" value="#ffffff"
 | 
				
			||||||
#color name="darkwhite" value="#00dddddd"
 | 
					# color name="darkwhite" value="#00dddddd"
 | 
				
			||||||
#color name="red" value="#f23d21"
 | 
					# color name="red" value="#f23d21"
 | 
				
			||||||
#color name="green" value="#389416"
 | 
					# color name="green" value="#389416"
 | 
				
			||||||
#color name="blue" value="#0064c7"
 | 
					# color name="blue" value="#0064c7"
 | 
				
			||||||
#color name="yellow" value="#bab329"
 | 
					# color name="yellow" value="#bab329"
 | 
				
			||||||
#color name="orange" value="#00ffa500"
 | 
					# color name="orange" value="#00ffa500"
 | 
				
			||||||
#color name="gray" value="#808080"
 | 
					# color name="gray" value="#808080"
 | 
				
			||||||
#color name="lightgrey" value="#009b9b9b"
 | 
					# color name="lightgrey" value="#009b9b9b"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#   font genel
 | 
					#   font genel
 | 
				
			||||||
#   font baslk
 | 
					#   font baslk
 | 
				
			||||||
#   font tasat
 | 
					#   font tasat
 | 
				
			||||||
#   font dugme
 | 
					#   font dugme
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#jak by chcial ktos wlasny selektor, to przyklad:
 | 
					# jak by chcial ktos wlasny selektor, to przyklad:
 | 
				
			||||||
#  <widget name="label19" position="73,422" size="596,25" font="tasat;22" halign="left" valign="center" zPosition="1" backgroundColor="black" transparent="1" foregroundColor="orange" />
 | 
					#  <widget name="label19" position="73,422" size="596,25" font="tasat;22" halign="left" valign="center" zPosition="1" backgroundColor="black" transparent="1" foregroundColor="orange" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### ImageChooseFULLHD
 | 
					# ImageChooseFULLHD
 | 
				
			||||||
ImageChooseFULLHD = """
 | 
					ImageChooseFULLHD = """
 | 
				
			||||||
<screen name="NeoBootImageChoose" position="center,center" size="1920,1080" title=" " flags="wfNoBorder" backgroundColor="transparent">
 | 
					<screen name="NeoBootImageChoose" position="center,center" size="1920,1080" title=" " flags="wfNoBorder" backgroundColor="transparent">
 | 
				
			||||||
  <eLabel backgroundColor="black" font="tasat;30" foregroundColor="red" position="75,50" size="309,45" valign="center" text="NEOBoot Multi-image" transparent="1" />
 | 
					  <eLabel backgroundColor="black" font="tasat;30" foregroundColor="red" position="75,50" size="309,45" valign="center" text="NEOBoot Multi-image" transparent="1" />
 | 
				
			||||||
@@ -121,4 +121,4 @@ ImageChooseFULLHD = """
 | 
				
			|||||||
"""
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###ImageChoose-HD
 | 
					# ImageChoose-HD
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ from Screens.Screen import Screen
 | 
				
			|||||||
from Components.Pixmap import Pixmap
 | 
					from Components.Pixmap import Pixmap
 | 
				
			||||||
import os
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### ImageChooseFULLHD                      
 | 
					# ImageChooseFULLHD
 | 
				
			||||||
ImageChooseFULLHD = """
 | 
					ImageChooseFULLHD = """
 | 
				
			||||||
<screen name="ImageChooseFULLHD" position="center,center" size="1920,1080" title=" " flags="wfBorder" backgroundColor="background" >
 | 
					<screen name="ImageChooseFULLHD" position="center,center" size="1920,1080" title=" " flags="wfBorder" backgroundColor="background" >
 | 
				
			||||||
    <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/neoskins/nitro/skin/background.png" position="center,0" size="1920,1080" alphatest="blend" />
 | 
					    <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/neoskins/nitro/skin/background.png" position="center,0" size="1920,1080" alphatest="blend" />
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@ from Components.Pixmap import Pixmap
 | 
				
			|||||||
import os
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###____ Skin HD - ImageChoose ___mod. gutosie ___
 | 
					# ____ Skin HD - ImageChoose ___mod. gutosie ___
 | 
				
			||||||
ImageChooseHD = """
 | 
					ImageChooseHD = """
 | 
				
			||||||
<screen name="NeoBootImageChoose" position="center,center" size="1280, 720" backgroundColor="transpBlack">
 | 
					<screen name="NeoBootImageChoose" position="center,center" size="1280, 720" backgroundColor="transpBlack">
 | 
				
			||||||
  <ePixmap position="0,0" zPosition="-1" size="1274,720" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/1frame_base-fs8.png" />
 | 
					  <ePixmap position="0,0" zPosition="-1" size="1274,720" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/1frame_base-fs8.png" />
 | 
				
			||||||
 
 | 
				
			|||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -101,6 +101,9 @@
 | 
				
			|||||||
"maxytecmulti"
 | 
					"maxytecmulti"
 | 
				
			||||||
"multibox"
 | 
					"multibox"
 | 
				
			||||||
"multiboxse"
 | 
					"multiboxse"
 | 
				
			||||||
 | 
					"novaler4k"
 | 
				
			||||||
 | 
					"novaler4kse"
 | 
				
			||||||
 | 
					"novaler4kpro"
 | 
				
			||||||
"viper4k" 
 | 
					"viper4k" 
 | 
				
			||||||
"et1x000" 
 | 
					"et1x000" 
 | 
				
			||||||
"gbquad4k"quad4k"
 | 
					"gbquad4k"quad4k"
 | 
				
			||||||
@@ -173,6 +176,5 @@ WWIO BRE2ZE 4K      :    bcm7251s
 | 
				
			|||||||
Axas HIS Twin       :    Hisilicon 3716MV410 (ARM v7)
 | 
					Axas HIS Twin       :    Hisilicon 3716MV410 (ARM v7)
 | 
				
			||||||
Qviart Lunix 4K     :   72604
 | 
					Qviart Lunix 4K     :   72604
 | 
				
			||||||
gigablue X3 4k      :    BCM 72604
 | 
					gigablue X3 4k      :    BCM 72604
 | 
				
			||||||
 | 
					 | 
				
			||||||
#END            
 | 
					#END            
 | 
				
			||||||
             
 | 
					             
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
# -*- coding: utf-8 -*-
 | 
					# -*- coding: utf-8 -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#from __init__ import _
 | 
					# from __init__ import _
 | 
				
			||||||
from Plugins.Extensions.NeoBoot.__init__ import _
 | 
					from Plugins.Extensions.NeoBoot.__init__ import _
 | 
				
			||||||
from Plugins.Extensions.NeoBoot.files.stbbranding import getSupportedTuners, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxHostName, getTunerModel, getNeoLocation, getNeoMount, getNeoMount2, getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2
 | 
					from Plugins.Extensions.NeoBoot.files.stbbranding import getSupportedTuners, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxHostName, getTunerModel, getNeoLocation, getNeoMount, getNeoMount2, getNeoMount3, getNeoMount4, getNeoMount5, getMountPointNeo2
 | 
				
			||||||
from enigma import getDesktop
 | 
					from enigma import getDesktop
 | 
				
			||||||
@@ -86,25 +86,29 @@ class StartImage(Screen):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def KeyOk(self):
 | 
					    def KeyOk(self):
 | 
				
			||||||
        if getImageNeoBoot() != 'Flash':
 | 
					        if getImageNeoBoot() != 'Flash':
 | 
				
			||||||
                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()
 | 
					            self.StartImageInNeoBoot()
 | 
				
			||||||
        else:
 | 
					        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()
 | 
					            self.StartImageInNeoBoot()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        #---------------------------------------------
 | 
					        # ---------------------------------------------
 | 
				
			||||||
        getMountPointNeo2()
 | 
					        getMountPointNeo2()
 | 
				
			||||||
        system('touch /tmp/.init_reboot')
 | 
					        system('touch /tmp/.init_reboot')
 | 
				
			||||||
        #---------------------------------------------
 | 
					        # ---------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def StartImageInNeoBoot(self):
 | 
					    def StartImageInNeoBoot(self):
 | 
				
			||||||
        if getImageNeoBoot() != 'Flash':
 | 
					        if getImageNeoBoot() != 'Flash':
 | 
				
			||||||
            if fileExists('%sImageBoot/%s/.control_ok' % (getNeoLocation(), getImageNeoBoot())):
 | 
					            if fileExists('%sImageBoot/%s/.control_ok' % (getNeoLocation(), getImageNeoBoot())):
 | 
				
			||||||
                system('touch /tmp/.control_ok ')
 | 
					                system('touch /tmp/.control_ok ')
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                system('touch %sImageBoot/%s/.control_boot_new_image ' % (getNeoLocation(), getImageNeoBoot()))
 | 
					                system('touch %sImageBoot/%s/.control_boot_new_image ' %
 | 
				
			||||||
 | 
					                       (getNeoLocation(), getImageNeoBoot()))
 | 
				
			||||||
        if fileExists('/.multinfo') and getCPUtype() == 'ARMv7':
 | 
					        if fileExists('/.multinfo') and getCPUtype() == 'ARMv7':
 | 
				
			||||||
                os.system(' ' + LinkNeoBoot + '/files/findsk.sh; mkdir -p /media/InternalFlash; mount /tmp/root /media/InternalFlash; sleep 1')
 | 
					            os.system(' ' + LinkNeoBoot +
 | 
				
			||||||
 | 
					                      '/files/findsk.sh; mkdir -p /media/InternalFlash; mount /tmp/root /media/InternalFlash; sleep 1')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.sel = self['list'].getCurrent()
 | 
					        self.sel = self['list'].getCurrent()
 | 
				
			||||||
        if self.sel:
 | 
					        if self.sel:
 | 
				
			||||||
@@ -113,31 +117,41 @@ class StartImage(Screen):
 | 
				
			|||||||
            if not fileExists('/bin/busybox.nosuid'):
 | 
					            if not fileExists('/bin/busybox.nosuid'):
 | 
				
			||||||
                os.system('ln -sf "busybox" "/bin/busybox.nosuid" ')
 | 
					                os.system('ln -sf "busybox" "/bin/busybox.nosuid" ')
 | 
				
			||||||
            if fileExists('/media/InternalFlash/etc/init.d/neomountboot.sh'):
 | 
					            if fileExists('/media/InternalFlash/etc/init.d/neomountboot.sh'):
 | 
				
			||||||
                os.system('rm -f /media/InternalFlash/etc/init.d/neomountboot.sh;')
 | 
					                os.system(
 | 
				
			||||||
 | 
					                    'rm -f /media/InternalFlash/etc/init.d/neomountboot.sh;')
 | 
				
			||||||
            if fileExists('/media/InternalFlash/linuxrootfs1/etc/init.d/neomountboot.sh'):
 | 
					            if fileExists('/media/InternalFlash/linuxrootfs1/etc/init.d/neomountboot.sh'):
 | 
				
			||||||
                os.system('rm -f /media/InternalFlash/linuxrootfs1/etc/init.d/neomountboot.sh;')
 | 
					                os.system(
 | 
				
			||||||
 | 
					                    'rm -f /media/InternalFlash/linuxrootfs1/etc/init.d/neomountboot.sh;')
 | 
				
			||||||
            if fileExists('/media/InternalFlash/linuxrootfs2/etc/init.d/neomountboot.sh'):
 | 
					            if fileExists('/media/InternalFlash/linuxrootfs2/etc/init.d/neomountboot.sh'):
 | 
				
			||||||
                os.system('rm -f /media/InternalFlash/linuxrootfs2/etc/init.d/neomountboot.sh;')
 | 
					                os.system(
 | 
				
			||||||
 | 
					                    'rm -f /media/InternalFlash/linuxrootfs2/etc/init.d/neomountboot.sh;')
 | 
				
			||||||
            if fileExists('/media/InternalFlash/linuxrootfs3/etc/init.d/neomountboot.sh'):
 | 
					            if fileExists('/media/InternalFlash/linuxrootfs3/etc/init.d/neomountboot.sh'):
 | 
				
			||||||
                os.system('rm -f /media/InternalFlash/linuxrootfs3/etc/init.d/neomountboot.sh;')
 | 
					                os.system(
 | 
				
			||||||
 | 
					                    'rm -f /media/InternalFlash/linuxrootfs3/etc/init.d/neomountboot.sh;')
 | 
				
			||||||
            if fileExists('/media/InternalFlash/linuxrootfs4/etc/init.d/neomountboot.sh'):
 | 
					            if fileExists('/media/InternalFlash/linuxrootfs4/etc/init.d/neomountboot.sh'):
 | 
				
			||||||
                os.system('rm -f /media/InternalFlash/linuxrootfs4/etc/init.d/neomountboot.sh;')
 | 
					                os.system(
 | 
				
			||||||
 | 
					                    'rm -f /media/InternalFlash/linuxrootfs4/etc/init.d/neomountboot.sh;')
 | 
				
			||||||
#            else:
 | 
					#            else:
 | 
				
			||||||
#                pass
 | 
					#                pass
 | 
				
			||||||
            #_____ARM procesor____
 | 
					            # _____ARM procesor____
 | 
				
			||||||
            if (getSupportedTuners()):
 | 
					            if (getSupportedTuners()):
 | 
				
			||||||
                if getImageNeoBoot() == 'Flash':
 | 
					                if getImageNeoBoot() == 'Flash':
 | 
				
			||||||
                    if fileExists('/.multinfo'):
 | 
					                    if fileExists('/.multinfo'):
 | 
				
			||||||
                        if fileExists('/media/InternalFlash/linuxrootfs1/sbin/neoinitarm'):
 | 
					                        if fileExists('/media/InternalFlash/linuxrootfs1/sbin/neoinitarm'):
 | 
				
			||||||
                                        os.system('ln -sf "init.sysvinit" "/media/InternalFlash/linuxrootfs1/sbin/init"')
 | 
					                            os.system(
 | 
				
			||||||
 | 
					                                'ln -sf "init.sysvinit" "/media/InternalFlash/linuxrootfs1/sbin/init"')
 | 
				
			||||||
                        if fileExists('/media/InternalFlash/linuxrootfs2/sbin/neoinitarm'):
 | 
					                        if fileExists('/media/InternalFlash/linuxrootfs2/sbin/neoinitarm'):
 | 
				
			||||||
                                        os.system('ln -sf "init.sysvinit" "/media/InternalFlash/linuxrootfs2/sbin/init"')
 | 
					                            os.system(
 | 
				
			||||||
 | 
					                                'ln -sf "init.sysvinit" "/media/InternalFlash/linuxrootfs2/sbin/init"')
 | 
				
			||||||
                        if fileExists('/media/InternalFlash/linuxrootfs3/sbin/neoinitarm'):
 | 
					                        if fileExists('/media/InternalFlash/linuxrootfs3/sbin/neoinitarm'):
 | 
				
			||||||
                                        os.system('ln -sf "init.sysvinit" "/media/InternalFlash/linuxrootfs3/sbin/init"')
 | 
					                            os.system(
 | 
				
			||||||
 | 
					                                'ln -sf "init.sysvinit" "/media/InternalFlash/linuxrootfs3/sbin/init"')
 | 
				
			||||||
                        if fileExists('/media/InternalFlash/linuxrootfs4/sbin/neoinitarm'):
 | 
					                        if fileExists('/media/InternalFlash/linuxrootfs4/sbin/neoinitarm'):
 | 
				
			||||||
                                        os.system('ln -sf "init.sysvinit" "/media/InternalFlash/linuxrootfs4/sbin/init"')
 | 
					                            os.system(
 | 
				
			||||||
 | 
					                                'ln -sf "init.sysvinit" "/media/InternalFlash/linuxrootfs4/sbin/init"')
 | 
				
			||||||
                        if fileExists('/media/InternalFlash/sbin/init'):
 | 
					                        if fileExists('/media/InternalFlash/sbin/init'):
 | 
				
			||||||
                                        os.system('ln -sfn "init.sysvinit" "/media/InternalFlash/sbin/init"')
 | 
					                            os.system(
 | 
				
			||||||
 | 
					                                'ln -sfn "init.sysvinit" "/media/InternalFlash/sbin/init"')
 | 
				
			||||||
                        if fileExists('/media/InternalFlash'):
 | 
					                        if fileExists('/media/InternalFlash'):
 | 
				
			||||||
                            self.session.open(TryQuitMainloop, 2)
 | 
					                            self.session.open(TryQuitMainloop, 2)
 | 
				
			||||||
                        else:
 | 
					                        else:
 | 
				
			||||||
@@ -179,12 +193,15 @@ class StartImage(Screen):
 | 
				
			|||||||
                        rc = os.system(cmd)
 | 
					                        rc = os.system(cmd)
 | 
				
			||||||
                        self.session.open(TryQuitMainloop, 2)
 | 
					                        self.session.open(TryQuitMainloop, 2)
 | 
				
			||||||
                else:
 | 
					                else:
 | 
				
			||||||
                            os.system('echo "Flash "  >> ' + getNeoLocation() + 'ImageBoot/.neonextboot')
 | 
					                    os.system('echo "Flash "  >> ' +
 | 
				
			||||||
                            self.messagebox = self.session.open(MessageBox, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8)
 | 
					                              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:
 | 
					            else:
 | 
				
			||||||
                            os.system('echo "Flash "  >> ' + getNeoLocation() + 'ImageBoot/.neonextboot')
 | 
					                os.system('echo "Flash "  >> ' + getNeoLocation() +
 | 
				
			||||||
                            self.messagebox = self.session.open(MessageBox, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8)
 | 
					                          '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()
 | 
				
			||||||
                            
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -85,30 +85,34 @@ class StartImage(Screen):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def KeyOk(self):
 | 
					    def KeyOk(self):
 | 
				
			||||||
        if getImageNeoBoot() != 'Flash':
 | 
					        if getImageNeoBoot() != 'Flash':
 | 
				
			||||||
                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()
 | 
					            self.StartImageInNeoBoot()
 | 
				
			||||||
        else:
 | 
					        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()
 | 
					            self.StartImageInNeoBoot()
 | 
				
			||||||
        #---------------------------------------------
 | 
					        # ---------------------------------------------
 | 
				
			||||||
        getMountPointNeo2()
 | 
					        getMountPointNeo2()
 | 
				
			||||||
        system('touch /tmp/.init_reboot')
 | 
					        system('touch /tmp/.init_reboot')
 | 
				
			||||||
        #---------------------------------------------
 | 
					        # ---------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def StartImageInNeoBoot(self):
 | 
					    def StartImageInNeoBoot(self):
 | 
				
			||||||
        if getImageNeoBoot() != 'Flash':
 | 
					        if getImageNeoBoot() != 'Flash':
 | 
				
			||||||
            if fileExists('%sImageBoot/%s/.control_ok' % (getNeoLocation(), getImageNeoBoot())):
 | 
					            if fileExists('%sImageBoot/%s/.control_ok' % (getNeoLocation(), getImageNeoBoot())):
 | 
				
			||||||
                system('touch /tmp/.control_ok ')
 | 
					                system('touch /tmp/.control_ok ')
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                system('touch %sImageBoot/%s/.control_boot_new_image ' % (getNeoLocation(), getImageNeoBoot()))
 | 
					                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()
 | 
					        self.sel = self['list'].getCurrent()
 | 
				
			||||||
        if self.sel:
 | 
					        if self.sel:
 | 
				
			||||||
            self.sel = self.sel[2]
 | 
					            self.sel = self.sel[2]
 | 
				
			||||||
        if self.sel == 0:
 | 
					        if self.sel == 0:
 | 
				
			||||||
            if fileExists('/media/InternalFlash/etc/init.d/neobootmount.sh'):
 | 
					            if fileExists('/media/InternalFlash/etc/init.d/neobootmount.sh'):
 | 
				
			||||||
                os.system('rm -f /media/InternalFlash/etc/init.d/neobootmount.sh;')
 | 
					                os.system(
 | 
				
			||||||
 | 
					                    'rm -f /media/InternalFlash/etc/init.d/neobootmount.sh;')
 | 
				
			||||||
            if (getSupportedTuners()):
 | 
					            if (getSupportedTuners()):
 | 
				
			||||||
                if getImageNeoBoot() == 'Flash':
 | 
					                if getImageNeoBoot() == 'Flash':
 | 
				
			||||||
                    cmd = 'ln -sfn /sbin/init.sysvinit /sbin/init'
 | 
					                    cmd = 'ln -sfn /sbin/init.sysvinit /sbin/init'
 | 
				
			||||||
@@ -122,23 +126,29 @@ class StartImage(Screen):
 | 
				
			|||||||
                        rc = os.system(cmd)
 | 
					                        rc = os.system(cmd)
 | 
				
			||||||
                        getTurnOffOnSystem()
 | 
					                        getTurnOffOnSystem()
 | 
				
			||||||
                    else:
 | 
					                    else:
 | 
				
			||||||
                                os.system('echo "Flash "  >> ' + getNeoLocation() + 'ImageBoot/.neonextboot')
 | 
					                        os.system('echo "Flash "  >> ' +
 | 
				
			||||||
 | 
					                                  getNeoLocation() + 'ImageBoot/.neonextboot')
 | 
				
			||||||
                        getTurnOffOnSystem()
 | 
					                        getTurnOffOnSystem()
 | 
				
			||||||
                else:
 | 
					                else:
 | 
				
			||||||
                            os.system('echo "Flash "  >> ' + getNeoLocation() + 'ImageBoot/.neonextboot')
 | 
					                    os.system('echo "Flash "  >> ' +
 | 
				
			||||||
                            self.messagebox = self.session.open(MessageBox, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8)
 | 
					                              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:
 | 
					            else:
 | 
				
			||||||
                            os.system('echo "Flash "  >> ' + getNeoLocation() + 'ImageBoot/.neonextboot')
 | 
					                os.system('echo "Flash "  >> ' + getNeoLocation() +
 | 
				
			||||||
                            self.messagebox = self.session.open(MessageBox, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8)
 | 
					                          '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()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getTurnOffOnSystem():
 | 
					def getTurnOffOnSystem():
 | 
				
			||||||
    for line in open("/etc/hostname"):
 | 
					    for line in open("/etc/hostname"):
 | 
				
			||||||
        if "dm500hd" in line or "dm800se" in line or "dm800" in line or "dm800se" in line or "dm8000" in line:
 | 
					        if "dm500hd" in line or "dm800se" in line or "dm800" in line or "dm800se" in line or "dm8000" in line:
 | 
				
			||||||
            if fileExists('%sImageBoot/%s/squashfs-images' % (getNeoLocation(), getImageNeoBoot())):
 | 
					            if fileExists('%sImageBoot/%s/squashfs-images' % (getNeoLocation(), getImageNeoBoot())):
 | 
				
			||||||
                                    os.system('ln -sf "%sImageBoot/%s/squashfs-images" "//squashfs-images"' % (getNeoLocation(), getImageNeoBoot()))
 | 
					                os.system('ln -sf "%sImageBoot/%s/squashfs-images" "//squashfs-images"' %
 | 
				
			||||||
                        os.system('echo 3 > /proc/sys/vm/drop_caches; shutdown now -r; reboot -f -d -h -i')
 | 
					                          (getNeoLocation(), getImageNeoBoot()))
 | 
				
			||||||
                        
 | 
					        os.system(
 | 
				
			||||||
                                
 | 
					            'echo 3 > /proc/sys/vm/drop_caches; shutdown now -r; reboot -f -d -h -i')
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,8 @@
 | 
				
			|||||||
# -*- coding: utf-8 -*-
 | 
					# -*- coding: utf-8 -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#from __init__ import _
 | 
					# from __init__ import _
 | 
				
			||||||
from Plugins.Extensions.NeoBoot.__init__ import _
 | 
					from Plugins.Extensions.NeoBoot.__init__ import _
 | 
				
			||||||
#from __future__ import print_function
 | 
					# 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 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 getDesktop
 | 
				
			||||||
from enigma import eTimer
 | 
					from enigma import eTimer
 | 
				
			||||||
@@ -33,6 +33,7 @@ import os
 | 
				
			|||||||
import time
 | 
					import time
 | 
				
			||||||
LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
 | 
					LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getMmcBlockDevice():
 | 
					def getMmcBlockDevice():
 | 
				
			||||||
    mmcblockdevice = 'UNKNOWN'
 | 
					    mmcblockdevice = 'UNKNOWN'
 | 
				
			||||||
    if getBoxHostName() == 'vuultimo4k' or getBoxHostName() == 'vusolo4k' or getBoxHostName() == 'vuuno4kse' or getBoxHostName() == 'vuuno4k' and getBoxHostName() != "ustym4kpro":
 | 
					    if getBoxHostName() == 'vuultimo4k' or getBoxHostName() == 'vusolo4k' or getBoxHostName() == 'vuuno4kse' or getBoxHostName() == 'vuuno4k' and getBoxHostName() != "ustym4kpro":
 | 
				
			||||||
@@ -43,6 +44,7 @@ def getMmcBlockDevice():
 | 
				
			|||||||
        mmcblockdevice = 'mmcblk0p6'
 | 
					        mmcblockdevice = 'mmcblk0p6'
 | 
				
			||||||
    return mmcblockdevice
 | 
					    return mmcblockdevice
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class StartImage(Screen):
 | 
					class StartImage(Screen):
 | 
				
			||||||
    screenwidth = getDesktop(0).size().width()
 | 
					    screenwidth = getDesktop(0).size().width()
 | 
				
			||||||
    if screenwidth and screenwidth == 1920:
 | 
					    if screenwidth and screenwidth == 1920:
 | 
				
			||||||
@@ -96,105 +98,141 @@ class StartImage(Screen):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def KeyOk(self):
 | 
					    def KeyOk(self):
 | 
				
			||||||
        if getImageNeoBoot() != "Flash":
 | 
					        if getImageNeoBoot() != "Flash":
 | 
				
			||||||
                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()
 | 
					            self.StartImageInNeoBoot()
 | 
				
			||||||
        else:
 | 
					        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()
 | 
					            self.StartImageInNeoBoot()
 | 
				
			||||||
        #---------------------------------------------
 | 
					        # ---------------------------------------------
 | 
				
			||||||
        getMountPointNeo2()
 | 
					        getMountPointNeo2()
 | 
				
			||||||
        system('touch /tmp/.init_reboot')
 | 
					        system('touch /tmp/.init_reboot')
 | 
				
			||||||
        #---------------------------------------------          
 | 
					        # ---------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def StartImageInNeoBoot(self):
 | 
					    def StartImageInNeoBoot(self):
 | 
				
			||||||
        if getImageNeoBoot() != "Flash":
 | 
					        if getImageNeoBoot() != "Flash":
 | 
				
			||||||
            if fileExists('%sImageBoot/%s/.control_ok' % (getNeoLocation(), getImageNeoBoot())):
 | 
					            if fileExists('%sImageBoot/%s/.control_ok' % (getNeoLocation(), getImageNeoBoot())):
 | 
				
			||||||
                system('touch /tmp/.control_ok ')
 | 
					                system('touch /tmp/.control_ok ')
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                system('touch %sImageBoot/%s/.control_boot_new_image ' % (getNeoLocation(), getImageNeoBoot()))
 | 
					                system('touch %sImageBoot/%s/.control_boot_new_image ' %
 | 
				
			||||||
 | 
					                       (getNeoLocation(), getImageNeoBoot()))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if fileExists('/.multinfo') and getCPUtype() == "ARMv7":
 | 
					        if fileExists('/.multinfo') and getCPUtype() == "ARMv7":
 | 
				
			||||||
            if getBoxVuModel() == "uno4kse" or getBoxVuModel() == "uno4k" or getBoxVuModel() == "ultimo4k" or getBoxVuModel() == "solo4k":
 | 
					            if getBoxVuModel() == "uno4kse" or getBoxVuModel() == "uno4k" or getBoxVuModel() == "ultimo4k" or getBoxVuModel() == "solo4k":
 | 
				
			||||||
                    os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p4 /media/InternalFlash')
 | 
					                os.system(
 | 
				
			||||||
 | 
					                    'mkdir -p /media/InternalFlash; mount /dev/mmcblk0p4 /media/InternalFlash')
 | 
				
			||||||
            elif getBoxVuModel() == 'duo4kse' or getBoxVuModel() == 'duo4k':
 | 
					            elif getBoxVuModel() == 'duo4kse' or getBoxVuModel() == 'duo4k':
 | 
				
			||||||
                    os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p9 /media/InternalFlash')
 | 
					                os.system(
 | 
				
			||||||
 | 
					                    'mkdir -p /media/InternalFlash; mount /dev/mmcblk0p9 /media/InternalFlash')
 | 
				
			||||||
            elif getBoxVuModel() == 'zero4k':
 | 
					            elif getBoxVuModel() == 'zero4k':
 | 
				
			||||||
                    os.system('mkdir -p /media/InternalFlash; mount /dev/mmcblk0p7 /media/InternalFlash')
 | 
					                os.system(
 | 
				
			||||||
 | 
					                    'mkdir -p /media/InternalFlash; mount /dev/mmcblk0p7 /media/InternalFlash')
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                        os.system(' ' + LinkNeoBoot + '/files/findsk.sh; mkdir -p /media/InternalFlash; mount /tmp/root /media/InternalFlash')
 | 
					                os.system(
 | 
				
			||||||
        #elif fileExists('/boot/STARTUP') and getCPUtype() == "ARMv7":
 | 
					                    ' ' + LinkNeoBoot + '/files/findsk.sh; mkdir -p /media/InternalFlash; mount /tmp/root /media/InternalFlash')
 | 
				
			||||||
                    #os.system('ln -sf "neoinitarmvu" "/boot/sbin/init"')                    
 | 
					        # elif fileExists('/boot/STARTUP') and getCPUtype() == "ARMv7":
 | 
				
			||||||
 | 
					                # os.system('ln -sf "neoinitarmvu" "/boot/sbin/init"')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.sel = self['list'].getCurrent()
 | 
					        self.sel = self['list'].getCurrent()
 | 
				
			||||||
        if self.sel:
 | 
					        if self.sel:
 | 
				
			||||||
            self.sel = self.sel[2]
 | 
					            self.sel = self.sel[2]
 | 
				
			||||||
        if self.sel == 0:
 | 
					        if self.sel == 0:
 | 
				
			||||||
            if fileExists('/media/InternalFlash/etc/init.d/neobootmount.sh'):
 | 
					            if fileExists('/media/InternalFlash/etc/init.d/neobootmount.sh'):
 | 
				
			||||||
                os.system('rm -f /media/InternalFlash/etc/init.d/neobootmount.sh;')
 | 
					                os.system(
 | 
				
			||||||
 | 
					                    'rm -f /media/InternalFlash/etc/init.d/neobootmount.sh;')
 | 
				
			||||||
            if not fileExists('/bin/busybox.nosuid'):
 | 
					            if not fileExists('/bin/busybox.nosuid'):
 | 
				
			||||||
                os.system('ln -sf "busybox" "/bin/busybox.nosuid" ')
 | 
					                os.system('ln -sf "busybox" "/bin/busybox.nosuid" ')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            # VUPLUS Arm mmc block device
 | 
					            # VUPLUS Arm mmc block device
 | 
				
			||||||
            if getCPUtype() == "ARMv7" and "vu" + getBoxVuModel() == getBoxHostName():
 | 
					            if getCPUtype() == "ARMv7" and "vu" + getBoxVuModel() == getBoxHostName():
 | 
				
			||||||
                if not fileExists('%sImagesUpload/.kernel/flash-kernel-%s.bin' % (getNeoLocation(), getBoxHostName())):
 | 
					                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()))
 | 
					                    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:
 | 
					                else:
 | 
				
			||||||
                    if getImageNeoBoot() == "Flash":
 | 
					                    if getImageNeoBoot() == "Flash":
 | 
				
			||||||
                        if fileExists("/.multinfo"):
 | 
					                        if 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 = 'cd /media/InternalFlash; ln -sf "init.sysvinit" "/media/InternalFlash/sbin/init"'
 | 
					                            cmd1 = 'cd /media/InternalFlash; ln -sf "init.sysvinit" "/media/InternalFlash/sbin/init"'
 | 
				
			||||||
                                        #Vu+ Real Multiboot
 | 
					                            # Vu+ Real Multiboot
 | 
				
			||||||
                                        if fileExists('/media/InternalFlash/STARTUP') and fileExists('/media/InternalFlash/zImage')  :
 | 
					                            if fileExists('/media/InternalFlash/STARTUP') and fileExists('/media/InternalFlash/zImage'):
 | 
				
			||||||
                                cmd2 = 'dd if=/media/InternalFlash/zImage of=/dev/' + getMmcBlockDevice() + ''
 | 
					                                cmd2 = 'dd if=/media/InternalFlash/zImage of=/dev/' + getMmcBlockDevice() + ''
 | 
				
			||||||
                            else:
 | 
					                            else:
 | 
				
			||||||
                                            cmd2 = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/' + getMmcBlockDevice() + ''
 | 
					                                cmd2 = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + \
 | 
				
			||||||
                                        #cmd2 = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/' + getMmcBlockDevice() + ''
 | 
					                                    getBoxHostName() + '.bin of=/dev/' + getMmcBlockDevice() + ''
 | 
				
			||||||
                                        cmd3 = "echo -e '\n%s '" % _('Start image FLASH - kernel flash !\nSTB NAME: ' + getBoxHostName() + '\nMODEL: ' + getBoxVuModel() + '\nNeoBoot location:' + getNeoLocation() + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____\n\n ------------ N E O B O O T ------------')
 | 
					                            # cmd2 = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/' + getMmcBlockDevice() + ''
 | 
				
			||||||
                                        cmd4 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true; cat /dev/' + getMmcBlockDevice() + ' | grep "kernel"; echo "Used Kernel: " ' + getImageNeoBoot() + ' > ' + getNeoLocation() + 'ImagesUpload/.kernel/used_flash_kernel; sleep 8; reboot -d -f'
 | 
					                            cmd3 = "echo -e '\n%s '" % _('Start image FLASH - kernel flash !\nSTB NAME: ' + getBoxHostName() + '\nMODEL: ' + getBoxVuModel() + '\nNeoBoot location:' + getNeoLocation(
 | 
				
			||||||
 | 
					                            ) + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____\n\n ------------ N E O B O O T ------------')
 | 
				
			||||||
 | 
					                            cmd4 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true; cat /dev/' + getMmcBlockDevice() + ' | grep "kernel"; echo "Used Kernel: " ' + \
 | 
				
			||||||
 | 
					                                getImageNeoBoot() + ' > ' + getNeoLocation() + \
 | 
				
			||||||
 | 
					                                'ImagesUpload/.kernel/used_flash_kernel; sleep 8; reboot -d -f'
 | 
				
			||||||
                        elif not fileExists("/.multinfo"):
 | 
					                        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 = 'sleep 5; ln -sf "init.sysvinit" "/sbin/init"'
 | 
					                            cmd1 = 'sleep 5; ln -sf "init.sysvinit" "/sbin/init"'
 | 
				
			||||||
                                        cmd2 = 'echo "Used Kernel: " ' + getImageNeoBoot() + ' > ' + getNeoLocation() + 'ImagesUpload/.kernel/used_flash_kernel' 
 | 
					                            cmd2 = 'echo "Used Kernel: " ' + getImageNeoBoot() + ' > ' + getNeoLocation() + \
 | 
				
			||||||
                                        cmd3 = "echo -e '\n%s '" % _('Start image FLASH - kernel flash !\nSTB NAME: ' + getBoxHostName() + '\nMODEL: ' + getBoxVuModel() + '\nNeoBoot location:' + getNeoLocation() + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____\n\n ------------ N E O B O O T ------------')
 | 
					                                'ImagesUpload/.kernel/used_flash_kernel'
 | 
				
			||||||
 | 
					                            cmd3 = "echo -e '\n%s '" % _('Start image FLASH - kernel flash !\nSTB NAME: ' + getBoxHostName() + '\nMODEL: ' + getBoxVuModel() + '\nNeoBoot location:' + getNeoLocation(
 | 
				
			||||||
 | 
					                            ) + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____\n\n ------------ N E O B O O T ------------')
 | 
				
			||||||
                            cmd4 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true; sleep 8; reboot -d -f'
 | 
					                            cmd4 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true; sleep 8; reboot -d -f'
 | 
				
			||||||
                    elif getImageNeoBoot() != "Flash":
 | 
					                    elif getImageNeoBoot() != "Flash":
 | 
				
			||||||
                        if not fileExists("/.multinfo"):
 | 
					                        if not fileExists("/.multinfo"):
 | 
				
			||||||
                            if not fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())):
 | 
					                            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...')
 | 
					                                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'
 | 
					                                cmd1 = 'sleep 5; ln -sfn /sbin/neoinitarm /sbin/init'
 | 
				
			||||||
                                        cmd2 = 'echo "Used Kernel: " ' + getImageNeoBoot() + ' > ' + getNeoLocation() + 'ImagesUpload/.kernel/used_flash_kernel' 
 | 
					                                cmd2 = 'echo "Used Kernel: " ' + getImageNeoBoot() + ' > ' + getNeoLocation() + \
 | 
				
			||||||
                                        cmd3 = "echo -e '\n%s '" % _('Reboot system E2 now !\nSTB NAME: ' + getBoxHostName() + '\nMODEL: ' + getBoxVuModel() + '\nNeoBoot location:' + getNeoLocation() + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will REBOOT in 5 seconds !____\n\n ------------ N E O B O O T ------------')
 | 
					                                    'ImagesUpload/.kernel/used_flash_kernel'
 | 
				
			||||||
 | 
					                                cmd3 = "echo -e '\n%s '" % _('Reboot system E2 now !\nSTB NAME: ' + getBoxHostName() + '\nMODEL: ' + getBoxVuModel() + '\nNeoBoot location:' + getNeoLocation(
 | 
				
			||||||
 | 
					                                ) + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will REBOOT in 5 seconds !____\n\n ------------ N E O B O O T ------------')
 | 
				
			||||||
                                cmd4 = 'sleep 8; reboot -d -f '
 | 
					                                cmd4 = 'sleep 8; reboot -d -f '
 | 
				
			||||||
                            elif fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())):
 | 
					                            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...')
 | 
					                                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'
 | 
					                                cmd1 = 'ln -sfn /sbin/neoinitarmvu /sbin/init'
 | 
				
			||||||
                                        cmd2 = 'dd if=' + getNeoLocation() + 'ImageBoot/' + getImageNeoBoot() + '/boot/zImage.' + getBoxHostName() + ' of=/dev/' + getMmcBlockDevice() + ''                                        
 | 
					                                cmd2 = 'dd if=' + getNeoLocation() + 'ImageBoot/' + getImageNeoBoot() + \
 | 
				
			||||||
                                        cmd3 = "echo -e '\n%s '" % _('Changed kernel COMPLETE !\nSTB NAME: ' + getBoxHostName() + '\nMODEL: ' + getBoxVuModel() + '\nNeoBoot location:' + getNeoLocation() + '\nCPU: ' + getCPUtype() + ' ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____\n\n ------------ N E O B O O T ------------')
 | 
					                                    '/boot/zImage.' + getBoxHostName() + ' of=/dev/' + getMmcBlockDevice() + ''
 | 
				
			||||||
                                        cmd4 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true; echo "Used Kernel: " ' + getImageNeoBoot() + ' > ' + getNeoLocation() + 'ImagesUpload/.kernel/used_flash_kernel; sleep 8; reboot -d -f'
 | 
					                                cmd3 = "echo -e '\n%s '" % _('Changed kernel COMPLETE !\nSTB NAME: ' + getBoxHostName() + '\nMODEL: ' + getBoxVuModel() + '\nNeoBoot location:' + getNeoLocation(
 | 
				
			||||||
 | 
					                                ) + '\nCPU: ' + getCPUtype() + ' ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____\n\n ------------ N E O B O O T ------------')
 | 
				
			||||||
 | 
					                                cmd4 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true; echo "Used Kernel: " ' + \
 | 
				
			||||||
 | 
					                                    getImageNeoBoot() + ' > ' + getNeoLocation() + \
 | 
				
			||||||
 | 
					                                    'ImagesUpload/.kernel/used_flash_kernel; sleep 8; reboot -d -f'
 | 
				
			||||||
                        elif fileExists("/.multinfo"):
 | 
					                        elif fileExists("/.multinfo"):
 | 
				
			||||||
                            if not fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())):
 | 
					                            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...')
 | 
					                                cmd = "echo -e '\n\n%s '" % _(
 | 
				
			||||||
                                        cmd1 = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + getBoxHostName() + '.bin of=/dev/' + getMmcBlockDevice() + ''
 | 
					                                    '...............NEOBOOT - REBOOT...............\nPlease wait, in a moment the decoder will be restarted...')
 | 
				
			||||||
 | 
					                                cmd1 = 'dd if=' + getNeoLocation() + 'ImagesUpload/.kernel/flash-kernel-' + \
 | 
				
			||||||
 | 
					                                    getBoxHostName() + '.bin of=/dev/' + getMmcBlockDevice() + ''
 | 
				
			||||||
                                cmd2 = 'cd /media/InternalFlash; ln -sf "neoinitarm" "/media/InternalFlash/sbin/init"'
 | 
					                                cmd2 = 'cd /media/InternalFlash; ln -sf "neoinitarm" "/media/InternalFlash/sbin/init"'
 | 
				
			||||||
                                        cmd3 = "echo -e '\n%s '" % _('Start image without changing the kernel!\nSTB NAME: ' + getBoxHostName() + '\nMODEL: ' + getBoxVuModel() + '\nNeoBoot location:' + getNeoLocation() + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____\n\n ------------ N E O B O O T ------------')
 | 
					                                cmd3 = "echo -e '\n%s '" % _('Start image without changing the kernel!\nSTB NAME: ' + getBoxHostName() + '\nMODEL: ' + getBoxVuModel() + '\nNeoBoot location:' + getNeoLocation(
 | 
				
			||||||
                                        cmd4 = 'echo "Used Kernel: " ' + getImageNeoBoot() + ' > ' + getNeoLocation() + 'ImagesUpload/.kernel/used_flash_kernel; sleep 8; reboot -d -f'
 | 
					                                ) + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____\n\n ------------ N E O B O O T ------------')
 | 
				
			||||||
 | 
					                                cmd4 = 'echo "Used Kernel: " ' + getImageNeoBoot() + ' > ' + getNeoLocation() + \
 | 
				
			||||||
 | 
					                                    'ImagesUpload/.kernel/used_flash_kernel; sleep 8; reboot -d -f'
 | 
				
			||||||
                            elif fileExists('%sImageBoot/%s/boot/zImage.%s' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())):
 | 
					                            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...')
 | 
					                                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"'
 | 
					                                cmd1 = 'cd /media/InternalFlash; ln -sf "neoinitarmvu" "/media/InternalFlash/sbin/init"'
 | 
				
			||||||
                                        cmd2 = 'dd if=' + getNeoLocation() + 'ImageBoot/' + getImageNeoBoot() + '/boot/zImage.' + getBoxHostName() + ' of=/dev/' + getMmcBlockDevice() + ''
 | 
					                                cmd2 = 'dd if=' + getNeoLocation() + 'ImageBoot/' + getImageNeoBoot() + \
 | 
				
			||||||
                                        cmd3 = "echo -e '\n%s '" % _('Changed kernel COMPLETE !\nSTB NAME: ' + getBoxHostName() + '\nMODEL: ' + getBoxVuModel() + '\nNeoBoot location:' + getNeoLocation() + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____ \n\n ------------ N E O B O O T ------------') 
 | 
					                                    '/boot/zImage.' + getBoxHostName() + ' of=/dev/' + getMmcBlockDevice() + ''
 | 
				
			||||||
                                        cmd4 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true; echo "Used Kernel: " ' + getImageNeoBoot() + ' > ' + getNeoLocation() + 'ImagesUpload/.kernel/used_flash_kernel; sleep 8; reboot -d -f'
 | 
					                                cmd3 = "echo -e '\n%s '" % _('Changed kernel COMPLETE !\nSTB NAME: ' + getBoxHostName() + '\nMODEL: ' + getBoxVuModel() + '\nNeoBoot location:' + getNeoLocation(
 | 
				
			||||||
 | 
					                                ) + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____ \n\n ------------ N E O B O O T ------------')
 | 
				
			||||||
 | 
					                                cmd4 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true; echo "Used Kernel: " ' + \
 | 
				
			||||||
 | 
					                                    getImageNeoBoot() + ' > ' + getNeoLocation() + \
 | 
				
			||||||
 | 
					                                    'ImagesUpload/.kernel/used_flash_kernel; sleep 8; reboot -d -f'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            self.session.open(Console, _('NeoBoot ARM VU+....'), [cmd, cmd1, cmd2, cmd3, cmd4])
 | 
					                    self.session.open(Console, _(
 | 
				
			||||||
 | 
					                        'NeoBoot ARM VU+....'), [cmd, cmd1, cmd2, cmd3, cmd4])
 | 
				
			||||||
                    self.close()
 | 
					                    self.close()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                            os.system('echo "Flash "  >> ' + getNeoLocation() + 'ImageBoot/.neonextboot')
 | 
					                os.system('echo "Flash "  >> ' + getNeoLocation() +
 | 
				
			||||||
                            self.messagebox = self.session.open(MessageBox, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8)
 | 
					                          '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()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def myclose2(self, message):
 | 
					    def myclose2(self, message):
 | 
				
			||||||
        self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
 | 
					        self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
 | 
				
			||||||
        self.close()
 | 
					        self.close()
 | 
				
			||||||
        
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -31,16 +31,19 @@ import os
 | 
				
			|||||||
import time
 | 
					import time
 | 
				
			||||||
LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
 | 
					LinkNeoBoot = '/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getMmcBlockDevice():
 | 
					def getMmcBlockDevice():
 | 
				
			||||||
    if getBoxHostName() == 'vuultimo' or getBoxHostName() == 'bm750' or getBoxHostName() == 'vuduo' or getBoxHostName() == 'vuuno' or getBoxHostName() == 'vusolo' or getBoxHostName() == 'vuduo':
 | 
					    if getBoxHostName() == 'vuultimo' or getBoxHostName() == 'bm750' or getBoxHostName() == 'vuduo' or getBoxHostName() == 'vuuno' or getBoxHostName() == 'vusolo' or getBoxHostName() == 'vuduo':
 | 
				
			||||||
        mmcblockdevice = 'mtd1'
 | 
					        mmcblockdevice = 'mtd1'
 | 
				
			||||||
        if fileExists('' + getNeoLocation() + 'ImageBoot/' + getImageNeoBoot() + '/etc/vtiversion.info') and getExtCheckHddUsb() == 'ext4':
 | 
					        if fileExists('' + getNeoLocation() + 'ImageBoot/' + getImageNeoBoot() + '/etc/vtiversion.info') and getExtCheckHddUsb() == 'ext4':
 | 
				
			||||||
            if fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())):
 | 
					            if fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())):
 | 
				
			||||||
                                        os.system('rm -r %sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName()))
 | 
					                os.system('rm -r %sImageBoot/%s/boot/%s.vmlinux.gz' %
 | 
				
			||||||
 | 
					                          (getNeoLocation(), getImageNeoBoot(), getBoxHostName()))
 | 
				
			||||||
    elif getBoxHostName() == 'vusolo2' or getBoxHostName() == 'vusolose' or getBoxHostName() == 'vuduo2' or getBoxHostName() == 'vuzero':
 | 
					    elif getBoxHostName() == 'vusolo2' or getBoxHostName() == 'vusolose' or getBoxHostName() == 'vuduo2' or getBoxHostName() == 'vuzero':
 | 
				
			||||||
        mmcblockdevice = 'mtd2'
 | 
					        mmcblockdevice = 'mtd2'
 | 
				
			||||||
    return mmcblockdevice
 | 
					    return mmcblockdevice
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class StartImage(Screen):
 | 
					class StartImage(Screen):
 | 
				
			||||||
    screenwidth = getDesktop(0).size().width()
 | 
					    screenwidth = getDesktop(0).size().width()
 | 
				
			||||||
    if screenwidth and screenwidth == 1920:
 | 
					    if screenwidth and screenwidth == 1920:
 | 
				
			||||||
@@ -94,25 +97,28 @@ class StartImage(Screen):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def KeyOk(self):
 | 
					    def KeyOk(self):
 | 
				
			||||||
        if getImageNeoBoot() != 'Flash':
 | 
					        if getImageNeoBoot() != 'Flash':
 | 
				
			||||||
                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()
 | 
					            self.StartImageInNeoBoot()
 | 
				
			||||||
        else:
 | 
					        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()
 | 
					            self.StartImageInNeoBoot()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if getNandWrite() == 'nandwrite':
 | 
					        if getNandWrite() == 'nandwrite':
 | 
				
			||||||
            os.system('echo "nandwrite" > /tmp/check_nandwrite')
 | 
					            os.system('echo "nandwrite" > /tmp/check_nandwrite')
 | 
				
			||||||
        #---------------------------------------------
 | 
					        # ---------------------------------------------
 | 
				
			||||||
        getMountPointNeo2()
 | 
					        getMountPointNeo2()
 | 
				
			||||||
        system('touch /tmp/.init_reboot')
 | 
					        system('touch /tmp/.init_reboot')
 | 
				
			||||||
        #---------------------------------------------
 | 
					        # ---------------------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def StartImageInNeoBoot(self):
 | 
					    def StartImageInNeoBoot(self):
 | 
				
			||||||
        if getImageNeoBoot() != 'Flash':
 | 
					        if getImageNeoBoot() != 'Flash':
 | 
				
			||||||
            if fileExists('%sImageBoot/%s/.control_ok' % (getNeoLocation(), getImageNeoBoot())):
 | 
					            if fileExists('%sImageBoot/%s/.control_ok' % (getNeoLocation(), getImageNeoBoot())):
 | 
				
			||||||
                system('touch /tmp/.control_ok ')
 | 
					                system('touch /tmp/.control_ok ')
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                system('touch %sImageBoot/%s/.control_boot_new_image ' % (getNeoLocation(), getImageNeoBoot()))
 | 
					                system('touch %sImageBoot/%s/.control_boot_new_image ' %
 | 
				
			||||||
 | 
					                       (getNeoLocation(), getImageNeoBoot()))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        system('chmod 755 /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/*')
 | 
					        system('chmod 755 /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/bin/*')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -121,91 +127,123 @@ class StartImage(Screen):
 | 
				
			|||||||
            self.sel = self.sel[2]
 | 
					            self.sel = self.sel[2]
 | 
				
			||||||
        if self.sel == 0:
 | 
					        if self.sel == 0:
 | 
				
			||||||
            if fileExists('/media/InternalFlash/etc/init.d/neobootmount.sh'):
 | 
					            if fileExists('/media/InternalFlash/etc/init.d/neobootmount.sh'):
 | 
				
			||||||
                os.system('rm -f /media/InternalFlash/etc/init.d/neobootmount.sh;')
 | 
					                os.system(
 | 
				
			||||||
 | 
					                    'rm -f /media/InternalFlash/etc/init.d/neobootmount.sh;')
 | 
				
			||||||
            if not fileExists('/bin/busybox.nosuid'):
 | 
					            if not fileExists('/bin/busybox.nosuid'):
 | 
				
			||||||
                os.system('ln -sf "busybox" "/bin/busybox.nosuid" ')
 | 
					                os.system('ln -sf "busybox" "/bin/busybox.nosuid" ')
 | 
				
			||||||
#################_____mips___##########################
 | 
					################# _____mips___##########################
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            #VUPLUS MIPS vu_dev_mtd1.sh
 | 
					            # VUPLUS MIPS vu_dev_mtd1.sh
 | 
				
			||||||
            if "vu" + getBoxVuModel() == getBoxHostName():
 | 
					            if "vu" + getBoxVuModel() == getBoxHostName():
 | 
				
			||||||
                getMmcBlockDevice()
 | 
					                getMmcBlockDevice()
 | 
				
			||||||
                if not fileExists('%sImagesUpload/.kernel/%s.vmlinux.gz' % (getNeoLocation(), getBoxHostName())):
 | 
					                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()))
 | 
					                    self.myclose2(
 | 
				
			||||||
 | 
					                        _('Error - in the location %sImagesUpload/.kernel/ \nkernel file not found flash kernel vmlinux.gz ' % getNeoLocation()))
 | 
				
			||||||
                else:
 | 
					                else:
 | 
				
			||||||
                    if getImageNeoBoot() == 'Flash':
 | 
					                    if getImageNeoBoot() == 'Flash':
 | 
				
			||||||
                        if fileExists('/.multinfo'):
 | 
					                        if fileExists('/.multinfo'):
 | 
				
			||||||
                                    cmd = "echo -e '\n%s '" % _('...............NeoBoot  REBOOT...............\nPlease wait, in a moment the decoder will be restarted...')
 | 
					                            cmd = "echo -e '\n%s '" % _(
 | 
				
			||||||
                                    cmd1 = 'flash_erase /dev/' + getMmcBlockDevice() + ' 0 0 > /dev/null 2>&1 ; flash_eraseall /dev/' + getMmcBlockDevice() + ' 0 0 > /dev/null 2>&1'
 | 
					                                '...............NeoBoot  REBOOT...............\nPlease wait, in a moment the decoder will be restarted...')
 | 
				
			||||||
 | 
					                            cmd1 = 'flash_erase /dev/' + getMmcBlockDevice() + ' 0 0 > /dev/null 2>&1 ; flash_eraseall /dev/' + \
 | 
				
			||||||
 | 
					                                getMmcBlockDevice() + ' 0 0 > /dev/null 2>&1'
 | 
				
			||||||
                            if getNandWrite() == 'nandwrite':
 | 
					                            if getNandWrite() == 'nandwrite':
 | 
				
			||||||
                                        cmd2 = 'nandwrite -p /dev/' + getMmcBlockDevice() + ' ' + getNeoLocation() + 'ImagesUpload/.kernel/' + getBoxHostName() + '.vmlinux.gz > /dev/null 2>&1'
 | 
					                                cmd2 = 'nandwrite -p /dev/' + getMmcBlockDevice() + ' ' + getNeoLocation() + \
 | 
				
			||||||
 | 
					                                    'ImagesUpload/.kernel/' + getBoxHostName() + '.vmlinux.gz > /dev/null 2>&1'
 | 
				
			||||||
                            else:
 | 
					                            else:
 | 
				
			||||||
                                        cmd2 = '' + LinkNeoBoot + '/bin/nandwrite -p /dev/' + getMmcBlockDevice() + ' ' + getNeoLocation() + 'ImagesUpload/.kernel/' + getBoxHostName() + '.vmlinux.gz > /dev/null 2>&1'                                                                        
 | 
					                                cmd2 = '' + LinkNeoBoot + '/bin/nandwrite -p /dev/' + getMmcBlockDevice() + ' ' + getNeoLocation() + \
 | 
				
			||||||
                                    cmd3 = "echo -e '\n%s '" % _('Start image FLASH - kernel flash !\n' + getNandWrite() + '\nSTB NAME: ' + getBoxHostName() + '\nNeoBoot location:' + getNeoLocation() + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____ ')
 | 
					                                    'ImagesUpload/.kernel/' + getBoxHostName() + '.vmlinux.gz > /dev/null 2>&1'
 | 
				
			||||||
 | 
					                            cmd3 = "echo -e '\n%s '" % _('Start image FLASH - kernel flash !\n' + getNandWrite() + '\nSTB NAME: ' + getBoxHostName() + '\nNeoBoot location:' + getNeoLocation(
 | 
				
			||||||
 | 
					                            ) + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____ ')
 | 
				
			||||||
                            cmd4 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true; sync; sleep 8; reboot -d -f'
 | 
					                            cmd4 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true; sync; sleep 8; reboot -d -f'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        elif not fileExists('/.multinfo'):
 | 
					                        elif not fileExists('/.multinfo'):
 | 
				
			||||||
                                    cmd = "echo -e '\n%s '" % _('...............NEOBOOT >> Reboot...............\nPlease wait, in a moment the decoder will be restarted...')
 | 
					                            cmd = "echo -e '\n%s '" % _(
 | 
				
			||||||
 | 
					                                '...............NEOBOOT >> Reboot...............\nPlease wait, in a moment the decoder will be restarted...')
 | 
				
			||||||
                            cmd1 = 'ln -sfn /sbin/init.sysvinit /sbin/init'
 | 
					                            cmd1 = 'ln -sfn /sbin/init.sysvinit /sbin/init'
 | 
				
			||||||
                            cmd2 = 'sync'
 | 
					                            cmd2 = 'sync'
 | 
				
			||||||
                                    cmd3 = "echo -e '\n%s '" % _('Start image flash !\nSTB NAME: ' + getBoxHostName() + '\nNeoBoot location:' + getNeoLocation() + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____ ')
 | 
					                            cmd3 = "echo -e '\n%s '" % _('Start image flash !\nSTB NAME: ' + getBoxHostName() + '\nNeoBoot location:' + getNeoLocation(
 | 
				
			||||||
 | 
					                            ) + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____ ')
 | 
				
			||||||
                            cmd4 = 'sleep 8; reboot -d -f'
 | 
					                            cmd4 = 'sleep 8; reboot -d -f'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    elif getImageNeoBoot() != 'Flash':
 | 
					                    elif getImageNeoBoot() != 'Flash':
 | 
				
			||||||
                        if fileExists('/.multinfo') and getImageNeoBoot() == getImageBootNow():
 | 
					                        if fileExists('/.multinfo') and getImageNeoBoot() == getImageBootNow():
 | 
				
			||||||
                                    cmd = "echo -e '\n%s '" % _('...............NEOBOOT > REBOOT...............\nPlease wait, in a moment the decoder will be restarted...')
 | 
					                            cmd = "echo -e '\n%s '" % _(
 | 
				
			||||||
 | 
					                                '...............NEOBOOT > REBOOT...............\nPlease wait, in a moment the decoder will be restarted...')
 | 
				
			||||||
                            cmd1 = 'ln -sfn /sbin/init.sysvinit /sbin/init'
 | 
					                            cmd1 = 'ln -sfn /sbin/init.sysvinit /sbin/init'
 | 
				
			||||||
                            cmd2 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true'
 | 
					                            cmd2 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true'
 | 
				
			||||||
                                    cmd3 = "echo -e '\n%s '" % _('Reboot system E2 now !\nSTB NAME: ' + getBoxHostName() + '\nNeoBoot location:' + getNeoLocation() + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will REBOOT in 5 seconds !____ ')
 | 
					                            cmd3 = "echo -e '\n%s '" % _('Reboot system E2 now !\nSTB NAME: ' + getBoxHostName() + '\nNeoBoot location:' + getNeoLocation(
 | 
				
			||||||
 | 
					                            ) + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will REBOOT in 5 seconds !____ ')
 | 
				
			||||||
                            cmd4 = 'sync; sleep 8; reboot -d -f '
 | 
					                            cmd4 = 'sync; sleep 8; reboot -d -f '
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        elif not fileExists('/.multinfo'):
 | 
					                        elif not fileExists('/.multinfo'):
 | 
				
			||||||
                            if fileExists('' + getNeoLocation() + 'ImageBoot/' + getImageNeoBoot() + '/boot/' + getBoxHostName() + '.vmlinux.gz'):
 | 
					                            if fileExists('' + getNeoLocation() + 'ImageBoot/' + getImageNeoBoot() + '/boot/' + getBoxHostName() + '.vmlinux.gz'):
 | 
				
			||||||
                                        cmd = "echo -e '\n%s '" % _('...............NEOBOOT-REBOOT...............\nPlease wait, in a moment the decoder will be restarted...')
 | 
					                                cmd = "echo -e '\n%s '" % _(
 | 
				
			||||||
                                        cmd1 = 'flash_erase /dev/' + getMmcBlockDevice() + ' 0 0 > /dev/null 2>&1; flash_eraseall /dev/' + getMmcBlockDevice() + ' 0 0 > /dev/null 2>&1'
 | 
					                                    '...............NEOBOOT-REBOOT...............\nPlease wait, in a moment the decoder will be restarted...')
 | 
				
			||||||
 | 
					                                cmd1 = 'flash_erase /dev/' + getMmcBlockDevice() + ' 0 0 > /dev/null 2>&1; flash_eraseall /dev/' + \
 | 
				
			||||||
 | 
					                                    getMmcBlockDevice() + ' 0 0 > /dev/null 2>&1'
 | 
				
			||||||
                                if getNandWrite() == 'nandwrite':
 | 
					                                if getNandWrite() == 'nandwrite':
 | 
				
			||||||
                                            cmd2 = 'nandwrite -p /dev/' + getMmcBlockDevice() + ' ' + getNeoLocation() + 'ImageBoot/' + getImageNeoBoot() + '/boot/' + getBoxHostName() + '.vmlinux.gz > /dev/null 2>&1'
 | 
					                                    cmd2 = 'nandwrite -p /dev/' + getMmcBlockDevice() + ' ' + getNeoLocation() + 'ImageBoot/' + \
 | 
				
			||||||
 | 
					                                        getImageNeoBoot() + '/boot/' + getBoxHostName() + '.vmlinux.gz > /dev/null 2>&1'
 | 
				
			||||||
                                else:
 | 
					                                else:
 | 
				
			||||||
                                            cmd2 = '' + LinkNeoBoot + '/bin/nandwrite -p /dev/' + getMmcBlockDevice() + ' ' + getNeoLocation() + 'ImageBoot/' + getImageNeoBoot() + '/boot/' + getBoxHostName() + '.vmlinux.gz > /dev/null 2>&1'                                         
 | 
					                                    cmd2 = '' + LinkNeoBoot + '/bin/nandwrite -p /dev/' + getMmcBlockDevice() + ' ' + getNeoLocation() + \
 | 
				
			||||||
                                        cmd3 = "echo -e '\n%s '" % _('Changed kernel COMPLETE ! ' + getNandWrite() + '\nSTB NAME: ' + getBoxHostName() + '\nNeoBoot location:' + getNeoLocation() + '\nCPU: ' + getCPUtype() + ' ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____ ')
 | 
					                                        'ImageBoot/' + getImageNeoBoot() + '/boot/' + getBoxHostName() + \
 | 
				
			||||||
 | 
					                                        '.vmlinux.gz > /dev/null 2>&1'
 | 
				
			||||||
 | 
					                                cmd3 = "echo -e '\n%s '" % _('Changed kernel COMPLETE ! ' + getNandWrite() + '\nSTB NAME: ' + getBoxHostName() + '\nNeoBoot location:' + getNeoLocation(
 | 
				
			||||||
 | 
					                                ) + '\nCPU: ' + getCPUtype() + ' ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____ ')
 | 
				
			||||||
                                cmd4 = 'ln -sfn /sbin/neoinitmipsvu /sbin/init; update-alternatives --remove vmlinux vmlinux-`uname -r` || true; sync; sleep 8; reboot -d -f'
 | 
					                                cmd4 = 'ln -sfn /sbin/neoinitmipsvu /sbin/init; update-alternatives --remove vmlinux vmlinux-`uname -r` || true; sync; sleep 8; reboot -d -f'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            elif not fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())):
 | 
					                            elif not fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())):
 | 
				
			||||||
                                        cmd = "echo -e '\n%s '" % _('...............NEOBOOT > REBOOT...............\nPlease wait, in a moment the decoder will be restarted...')
 | 
					                                cmd = "echo -e '\n%s '" % _(
 | 
				
			||||||
 | 
					                                    '...............NEOBOOT > REBOOT...............\nPlease wait, in a moment the decoder will be restarted...')
 | 
				
			||||||
                                cmd1 = 'ln -sfn /sbin/neoinitmipsvu /sbin/init'
 | 
					                                cmd1 = 'ln -sfn /sbin/neoinitmipsvu /sbin/init'
 | 
				
			||||||
                                cmd2 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true'
 | 
					                                cmd2 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true'
 | 
				
			||||||
                                        cmd3 = "echo -e '\n%s '" % _('Start image without changing the kernel!\nSTB NAME: ' + getBoxHostName() + '\nNeoBoot location:' + getNeoLocation() + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____ ')
 | 
					                                cmd3 = "echo -e '\n%s '" % _('Start image without changing the kernel!\nSTB NAME: ' + getBoxHostName() + '\nNeoBoot location:' + getNeoLocation(
 | 
				
			||||||
 | 
					                                ) + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____ ')
 | 
				
			||||||
                                cmd4 = 'sync; sleep 8; reboot -d -f'
 | 
					                                cmd4 = 'sync; sleep 8; reboot -d -f'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        elif fileExists('/.multinfo'):
 | 
					                        elif fileExists('/.multinfo'):
 | 
				
			||||||
                            if not fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())):
 | 
					                            if not fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())):
 | 
				
			||||||
                                        cmd = "echo -e '\n%s '" % _('...............NeoBoot  REBOOT...............\nPlease wait, in a moment the decoder will be restarted...')
 | 
					                                cmd = "echo -e '\n%s '" % _(
 | 
				
			||||||
                                        cmd1 = 'flash_erase /dev/' + getMmcBlockDevice() + ' 0 0 > /dev/null 2>&1 ; flash_eraseall /dev/' + getMmcBlockDevice() + ' 0 0 > /dev/null 2>&1'
 | 
					                                    '...............NeoBoot  REBOOT...............\nPlease wait, in a moment the decoder will be restarted...')
 | 
				
			||||||
 | 
					                                cmd1 = 'flash_erase /dev/' + getMmcBlockDevice() + ' 0 0 > /dev/null 2>&1 ; flash_eraseall /dev/' + \
 | 
				
			||||||
 | 
					                                    getMmcBlockDevice() + ' 0 0 > /dev/null 2>&1'
 | 
				
			||||||
                                if getNandWrite() == 'nandwrite':
 | 
					                                if getNandWrite() == 'nandwrite':
 | 
				
			||||||
                                            cmd2 = 'nandwrite -p /dev/' + getMmcBlockDevice() + ' ' + getNeoLocation() + 'ImagesUpload/.kernel/' + getBoxHostName() + '.vmlinux.gz > /dev/null 2>&1'
 | 
					                                    cmd2 = 'nandwrite -p /dev/' + getMmcBlockDevice() + ' ' + getNeoLocation() + \
 | 
				
			||||||
 | 
					                                        'ImagesUpload/.kernel/' + getBoxHostName() + '.vmlinux.gz > /dev/null 2>&1'
 | 
				
			||||||
                                else:
 | 
					                                else:
 | 
				
			||||||
                                            cmd2 = '' + LinkNeoBoot + '/bin/nandwrite -p /dev/' + getMmcBlockDevice() + ' ' + getNeoLocation() + 'ImagesUpload/.kernel/' + getBoxHostName() + '.vmlinux.gz > /dev/null 2>&1'                                                                        
 | 
					                                    cmd2 = '' + LinkNeoBoot + '/bin/nandwrite -p /dev/' + getMmcBlockDevice() + ' ' + getNeoLocation() + \
 | 
				
			||||||
                                        cmd3 = "echo -e '\n%s '" % _('Changed kernel COMPLETE ! ' + getNandWrite() + '\nSTB NAME: ' + getBoxHostName() + '\nNeoBoot location:' + getNeoLocation() + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____ ')
 | 
					                                        'ImagesUpload/.kernel/' + getBoxHostName() + '.vmlinux.gz > /dev/null 2>&1'
 | 
				
			||||||
 | 
					                                cmd3 = "echo -e '\n%s '" % _('Changed kernel COMPLETE ! ' + getNandWrite() + '\nSTB NAME: ' + getBoxHostName() + '\nNeoBoot location:' + getNeoLocation(
 | 
				
			||||||
 | 
					                                ) + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____ ')
 | 
				
			||||||
                                cmd4 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true; sync; sleep 8; reboot -d -f'
 | 
					                                cmd4 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true; sync; sleep 8; reboot -d -f'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            elif fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())):
 | 
					                            elif fileExists('%sImageBoot/%s/boot/%s.vmlinux.gz' % (getNeoLocation(), getImageNeoBoot(), getBoxHostName())):
 | 
				
			||||||
                                        cmd = "echo -e '\n%s '" % _('...............REBOOT now...............\nPlease wait, in a moment the decoder will be restarted...')
 | 
					                                cmd = "echo -e '\n%s '" % _(
 | 
				
			||||||
                                        cmd1 = 'flash_erase /dev/' + getMmcBlockDevice() + ' 0 0 > /dev/null 2>&1 ; flash_eraseall /dev/' + getMmcBlockDevice() + ' 0 0 > /dev/null 2>&1 '
 | 
					                                    '...............REBOOT now...............\nPlease wait, in a moment the decoder will be restarted...')
 | 
				
			||||||
 | 
					                                cmd1 = 'flash_erase /dev/' + getMmcBlockDevice() + ' 0 0 > /dev/null 2>&1 ; flash_eraseall /dev/' + \
 | 
				
			||||||
 | 
					                                    getMmcBlockDevice() + ' 0 0 > /dev/null 2>&1 '
 | 
				
			||||||
                                if getNandWrite() == 'nandwrite':
 | 
					                                if getNandWrite() == 'nandwrite':
 | 
				
			||||||
                                            cmd2 = 'nandwrite -p /dev/' + getMmcBlockDevice() + ' ' + getNeoLocation() + 'ImageBoot/' + getImageNeoBoot() + '/boot/' + getBoxHostName() + '.vmlinux.gz > /dev/null 2>&1'
 | 
					                                    cmd2 = 'nandwrite -p /dev/' + getMmcBlockDevice() + ' ' + getNeoLocation() + 'ImageBoot/' + \
 | 
				
			||||||
 | 
					                                        getImageNeoBoot() + '/boot/' + getBoxHostName() + '.vmlinux.gz > /dev/null 2>&1'
 | 
				
			||||||
                                else:
 | 
					                                else:
 | 
				
			||||||
                                            cmd2 = '' + LinkNeoBoot + '/bin/nandwrite -p /dev/' + getMmcBlockDevice() + ' ' + getNeoLocation() + 'ImageBoot/' + getImageNeoBoot() + '/boot/' + getBoxHostName() + '.vmlinux.gz > /dev/null 2>&1'
 | 
					                                    cmd2 = '' + LinkNeoBoot + '/bin/nandwrite -p /dev/' + getMmcBlockDevice() + ' ' + getNeoLocation() + \
 | 
				
			||||||
                                        cmd3 = "echo -e '\n%s '" % _('Changed kernel COMPLETE ! ' + getNandWrite() + '\nSTB NAME: ' + getBoxHostName() + '\nNeoBoot location:' + getNeoLocation() + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____ ') 
 | 
					                                        'ImageBoot/' + getImageNeoBoot() + '/boot/' + getBoxHostName() + \
 | 
				
			||||||
 | 
					                                        '.vmlinux.gz > /dev/null 2>&1'
 | 
				
			||||||
 | 
					                                cmd3 = "echo -e '\n%s '" % _('Changed kernel COMPLETE ! ' + getNandWrite() + '\nSTB NAME: ' + getBoxHostName() + '\nNeoBoot location:' + getNeoLocation(
 | 
				
			||||||
 | 
					                                ) + '\nCPU: ' + getCPUSoC() + '\nImage boot: ' + getImageNeoBoot() + '\n____Your device will reboot in 5 seconds !____ ')
 | 
				
			||||||
                                cmd4 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true; sync; sleep 8; reboot -d -f'
 | 
					                                cmd4 = 'update-alternatives --remove vmlinux vmlinux-`uname -r` || true; sync; sleep 8; reboot -d -f'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            self.session.open(Console, _('NeoBoot MIPS....'), [cmd, cmd1, cmd2, cmd3, cmd4])
 | 
					                    self.session.open(Console, _('NeoBoot MIPS....'), [
 | 
				
			||||||
 | 
					                                      cmd, cmd1, cmd2, cmd3, cmd4])
 | 
				
			||||||
                    self.close()
 | 
					                    self.close()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                            os.system('echo "Flash "  >> ' + getNeoLocation() + 'ImageBoot/.neonextboot')
 | 
					                os.system('echo "Flash "  >> ' + getNeoLocation() +
 | 
				
			||||||
                            self.messagebox = self.session.open(MessageBox, _('It looks like it that multiboot does not support this STB.'), MessageBox.TYPE_INFO, 8)
 | 
					                          '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()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def myclose2(self, message):
 | 
					    def myclose2(self, message):
 | 
				
			||||||
        self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
 | 
					        self.session.open(MessageBox, message, MessageBox.TYPE_INFO)
 | 
				
			||||||
        self.close()
 | 
					        self.close()
 | 
				
			||||||
        
 | 
					 | 
				
			||||||
 
 | 
				
			|||||||
@@ -162,7 +162,8 @@ class HelpFormatter(object):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            invocation_length = max([len(s) for s in invocations])
 | 
					            invocation_length = max([len(s) for s in invocations])
 | 
				
			||||||
            action_length = invocation_length + self._current_indent
 | 
					            action_length = invocation_length + self._current_indent
 | 
				
			||||||
            self._action_max_length = max(self._action_max_length, action_length)
 | 
					            self._action_max_length = max(
 | 
				
			||||||
 | 
					                self._action_max_length, action_length)
 | 
				
			||||||
            self._add_item(self._format_action, [action])
 | 
					            self._add_item(self._format_action, [action])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def add_arguments(self, actions):
 | 
					    def add_arguments(self, actions):
 | 
				
			||||||
@@ -325,7 +326,8 @@ class HelpFormatter(object):
 | 
				
			|||||||
        return self._fill_text(text, text_width, indent) + '\n\n'
 | 
					        return self._fill_text(text, text_width, indent) + '\n\n'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _format_action(self, action):
 | 
					    def _format_action(self, action):
 | 
				
			||||||
        help_position = min(self._action_max_length + 2, self._max_help_position)
 | 
					        help_position = min(self._action_max_length +
 | 
				
			||||||
 | 
					                            2, self._max_help_position)
 | 
				
			||||||
        help_width = self._width - help_position
 | 
					        help_width = self._width - help_position
 | 
				
			||||||
        action_width = help_position - self._current_indent - 2
 | 
					        action_width = help_position - self._current_indent - 2
 | 
				
			||||||
        action_header = self._format_action_invocation(action)
 | 
					        action_header = self._format_action_invocation(action)
 | 
				
			||||||
@@ -539,10 +541,12 @@ class _StoreAction(Action):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def __init__(self, option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None):
 | 
					    def __init__(self, option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None):
 | 
				
			||||||
        if nargs == 0:
 | 
					        if nargs == 0:
 | 
				
			||||||
            raise ValueError('nargs for store actions must be > 0; if you have nothing to store, actions such as store true or store const may be more appropriate')
 | 
					            raise ValueError(
 | 
				
			||||||
 | 
					                'nargs for store actions must be > 0; if you have nothing to store, actions such as store true or store const may be more appropriate')
 | 
				
			||||||
        if const is not None and nargs != OPTIONAL:
 | 
					        if const is not None and nargs != OPTIONAL:
 | 
				
			||||||
            raise ValueError('nargs must be %r to supply const' % OPTIONAL)
 | 
					            raise ValueError('nargs must be %r to supply const' % OPTIONAL)
 | 
				
			||||||
        super(_StoreAction, self).__init__(option_strings=option_strings, dest=dest, nargs=nargs, const=const, default=default, type=type, choices=choices, required=required, help=help, metavar=metavar)
 | 
					        super(_StoreAction, self).__init__(option_strings=option_strings, dest=dest, nargs=nargs, const=const,
 | 
				
			||||||
 | 
					                                           default=default, type=type, choices=choices, required=required, help=help, metavar=metavar)
 | 
				
			||||||
        return
 | 
					        return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __call__(self, parser, namespace, values, option_string=None):
 | 
					    def __call__(self, parser, namespace, values, option_string=None):
 | 
				
			||||||
@@ -552,7 +556,8 @@ class _StoreAction(Action):
 | 
				
			|||||||
class _StoreConstAction(Action):
 | 
					class _StoreConstAction(Action):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, option_strings, dest, const, default=None, required=False, help=None, metavar=None):
 | 
					    def __init__(self, option_strings, dest, const, default=None, required=False, help=None, metavar=None):
 | 
				
			||||||
        super(_StoreConstAction, self).__init__(option_strings=option_strings, dest=dest, nargs=0, const=const, default=default, required=required, help=help)
 | 
					        super(_StoreConstAction, self).__init__(option_strings=option_strings,
 | 
				
			||||||
 | 
					                                                dest=dest, nargs=0, const=const, default=default, required=required, help=help)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __call__(self, parser, namespace, values, option_string=None):
 | 
					    def __call__(self, parser, namespace, values, option_string=None):
 | 
				
			||||||
        setattr(namespace, self.dest, self.const)
 | 
					        setattr(namespace, self.dest, self.const)
 | 
				
			||||||
@@ -561,23 +566,27 @@ class _StoreConstAction(Action):
 | 
				
			|||||||
class _StoreTrueAction(_StoreConstAction):
 | 
					class _StoreTrueAction(_StoreConstAction):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, option_strings, dest, default=False, required=False, help=None):
 | 
					    def __init__(self, option_strings, dest, default=False, required=False, help=None):
 | 
				
			||||||
        super(_StoreTrueAction, self).__init__(option_strings=option_strings, dest=dest, const=True, default=default, required=required, help=help)
 | 
					        super(_StoreTrueAction, self).__init__(option_strings=option_strings,
 | 
				
			||||||
 | 
					                                               dest=dest, const=True, default=default, required=required, help=help)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class _StoreFalseAction(_StoreConstAction):
 | 
					class _StoreFalseAction(_StoreConstAction):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, option_strings, dest, default=True, required=False, help=None):
 | 
					    def __init__(self, option_strings, dest, default=True, required=False, help=None):
 | 
				
			||||||
        super(_StoreFalseAction, self).__init__(option_strings=option_strings, dest=dest, const=False, default=default, required=required, help=help)
 | 
					        super(_StoreFalseAction, self).__init__(option_strings=option_strings,
 | 
				
			||||||
 | 
					                                                dest=dest, const=False, default=default, required=required, help=help)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class _AppendAction(Action):
 | 
					class _AppendAction(Action):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None):
 | 
					    def __init__(self, option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None):
 | 
				
			||||||
        if nargs == 0:
 | 
					        if nargs == 0:
 | 
				
			||||||
            raise ValueError('nargs for append actions must be > 0; if arg strings are not supplying the value to append, the append const action may be more appropriate')
 | 
					            raise ValueError(
 | 
				
			||||||
 | 
					                'nargs for append actions must be > 0; if arg strings are not supplying the value to append, the append const action may be more appropriate')
 | 
				
			||||||
        if const is not None and nargs != OPTIONAL:
 | 
					        if const is not None and nargs != OPTIONAL:
 | 
				
			||||||
            raise ValueError('nargs must be %r to supply const' % OPTIONAL)
 | 
					            raise ValueError('nargs must be %r to supply const' % OPTIONAL)
 | 
				
			||||||
        super(_AppendAction, self).__init__(option_strings=option_strings, dest=dest, nargs=nargs, const=const, default=default, type=type, choices=choices, required=required, help=help, metavar=metavar)
 | 
					        super(_AppendAction, self).__init__(option_strings=option_strings, dest=dest, nargs=nargs, const=const,
 | 
				
			||||||
 | 
					                                            default=default, type=type, choices=choices, required=required, help=help, metavar=metavar)
 | 
				
			||||||
        return
 | 
					        return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __call__(self, parser, namespace, values, option_string=None):
 | 
					    def __call__(self, parser, namespace, values, option_string=None):
 | 
				
			||||||
@@ -589,7 +598,8 @@ class _AppendAction(Action):
 | 
				
			|||||||
class _AppendConstAction(Action):
 | 
					class _AppendConstAction(Action):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, option_strings, dest, const, default=None, required=False, help=None, metavar=None):
 | 
					    def __init__(self, option_strings, dest, const, default=None, required=False, help=None, metavar=None):
 | 
				
			||||||
        super(_AppendConstAction, self).__init__(option_strings=option_strings, dest=dest, nargs=0, const=const, default=default, required=required, help=help, metavar=metavar)
 | 
					        super(_AppendConstAction, self).__init__(option_strings=option_strings, dest=dest,
 | 
				
			||||||
 | 
					                                                 nargs=0, const=const, default=default, required=required, help=help, metavar=metavar)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __call__(self, parser, namespace, values, option_string=None):
 | 
					    def __call__(self, parser, namespace, values, option_string=None):
 | 
				
			||||||
        items = _copy.copy(_ensure_value(namespace, self.dest, []))
 | 
					        items = _copy.copy(_ensure_value(namespace, self.dest, []))
 | 
				
			||||||
@@ -600,7 +610,8 @@ class _AppendConstAction(Action):
 | 
				
			|||||||
class _CountAction(Action):
 | 
					class _CountAction(Action):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, option_strings, dest, default=None, required=False, help=None):
 | 
					    def __init__(self, option_strings, dest, default=None, required=False, help=None):
 | 
				
			||||||
        super(_CountAction, self).__init__(option_strings=option_strings, dest=dest, nargs=0, default=default, required=required, help=help)
 | 
					        super(_CountAction, self).__init__(option_strings=option_strings,
 | 
				
			||||||
 | 
					                                           dest=dest, nargs=0, default=default, required=required, help=help)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __call__(self, parser, namespace, values, option_string=None):
 | 
					    def __call__(self, parser, namespace, values, option_string=None):
 | 
				
			||||||
        new_count = _ensure_value(namespace, self.dest, 0) + 1
 | 
					        new_count = _ensure_value(namespace, self.dest, 0) + 1
 | 
				
			||||||
@@ -610,7 +621,8 @@ class _CountAction(Action):
 | 
				
			|||||||
class _HelpAction(Action):
 | 
					class _HelpAction(Action):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, option_strings, dest=SUPPRESS, default=SUPPRESS, help=None):
 | 
					    def __init__(self, option_strings, dest=SUPPRESS, default=SUPPRESS, help=None):
 | 
				
			||||||
        super(_HelpAction, self).__init__(option_strings=option_strings, dest=dest, default=default, nargs=0, help=help)
 | 
					        super(_HelpAction, self).__init__(option_strings=option_strings,
 | 
				
			||||||
 | 
					                                          dest=dest, default=default, nargs=0, help=help)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __call__(self, parser, namespace, values, option_string=None):
 | 
					    def __call__(self, parser, namespace, values, option_string=None):
 | 
				
			||||||
        parser.print_help()
 | 
					        parser.print_help()
 | 
				
			||||||
@@ -620,7 +632,8 @@ class _HelpAction(Action):
 | 
				
			|||||||
class _VersionAction(Action):
 | 
					class _VersionAction(Action):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, option_strings, version=None, dest=SUPPRESS, default=SUPPRESS, help="show program's version number and exit"):
 | 
					    def __init__(self, option_strings, version=None, dest=SUPPRESS, default=SUPPRESS, help="show program's version number and exit"):
 | 
				
			||||||
        super(_VersionAction, self).__init__(option_strings=option_strings, dest=dest, default=default, nargs=0, help=help)
 | 
					        super(_VersionAction, self).__init__(option_strings=option_strings,
 | 
				
			||||||
 | 
					                                             dest=dest, default=default, nargs=0, help=help)
 | 
				
			||||||
        self.version = version
 | 
					        self.version = version
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __call__(self, parser, namespace, values, option_string=None):
 | 
					    def __call__(self, parser, namespace, values, option_string=None):
 | 
				
			||||||
@@ -646,7 +659,8 @@ class _SubParsersAction(Action):
 | 
				
			|||||||
        self._parser_class = parser_class
 | 
					        self._parser_class = parser_class
 | 
				
			||||||
        self._name_parser_map = _collections.OrderedDict()
 | 
					        self._name_parser_map = _collections.OrderedDict()
 | 
				
			||||||
        self._choices_actions = []
 | 
					        self._choices_actions = []
 | 
				
			||||||
        super(_SubParsersAction, self).__init__(option_strings=option_strings, dest=dest, nargs=PARSER, choices=self._name_parser_map, help=help, metavar=metavar)
 | 
					        super(_SubParsersAction, self).__init__(option_strings=option_strings, dest=dest,
 | 
				
			||||||
 | 
					                                                nargs=PARSER, choices=self._name_parser_map, help=help, metavar=metavar)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def add_parser(self, name, **kwargs):
 | 
					    def add_parser(self, name, **kwargs):
 | 
				
			||||||
        if kwargs.get('prog') is None:
 | 
					        if kwargs.get('prog') is None:
 | 
				
			||||||
@@ -674,7 +688,8 @@ class _SubParsersAction(Action):
 | 
				
			|||||||
            msg = _('unknown parser %r (choices: %s)') % tup
 | 
					            msg = _('unknown parser %r (choices: %s)') % tup
 | 
				
			||||||
            raise ArgumentError(self, msg)
 | 
					            raise ArgumentError(self, msg)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        namespace, arg_strings = parser.parse_known_args(arg_strings, namespace)
 | 
					        namespace, arg_strings = parser.parse_known_args(
 | 
				
			||||||
 | 
					            arg_strings, namespace)
 | 
				
			||||||
        if arg_strings:
 | 
					        if arg_strings:
 | 
				
			||||||
            vars(namespace).setdefault(_UNRECOGNIZED_ARGS_ATTR, [])
 | 
					            vars(namespace).setdefault(_UNRECOGNIZED_ARGS_ATTR, [])
 | 
				
			||||||
            getattr(namespace, _UNRECOGNIZED_ARGS_ATTR).extend(arg_strings)
 | 
					            getattr(namespace, _UNRECOGNIZED_ARGS_ATTR).extend(arg_strings)
 | 
				
			||||||
@@ -799,7 +814,8 @@ class _ActionsContainer(object):
 | 
				
			|||||||
            try:
 | 
					            try:
 | 
				
			||||||
                self._get_formatter()._format_args(action, None)
 | 
					                self._get_formatter()._format_args(action, None)
 | 
				
			||||||
            except TypeError:
 | 
					            except TypeError:
 | 
				
			||||||
                raise ValueError('length of metavar tuple does not match nargs')
 | 
					                raise ValueError(
 | 
				
			||||||
 | 
					                    'length of metavar tuple does not match nargs')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return self._add_action(action)
 | 
					        return self._add_action(action)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -841,12 +857,14 @@ class _ActionsContainer(object):
 | 
				
			|||||||
        group_map = {}
 | 
					        group_map = {}
 | 
				
			||||||
        for group in container._action_groups:
 | 
					        for group in container._action_groups:
 | 
				
			||||||
            if group.title not in title_group_map:
 | 
					            if group.title not in title_group_map:
 | 
				
			||||||
                title_group_map[group.title] = self.add_argument_group(title=group.title, description=group.description, conflict_handler=group.conflict_handler)
 | 
					                title_group_map[group.title] = self.add_argument_group(
 | 
				
			||||||
 | 
					                    title=group.title, description=group.description, conflict_handler=group.conflict_handler)
 | 
				
			||||||
            for action in group._group_actions:
 | 
					            for action in group._group_actions:
 | 
				
			||||||
                group_map[action] = title_group_map[group.title]
 | 
					                group_map[action] = title_group_map[group.title]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        for group in container._mutually_exclusive_groups:
 | 
					        for group in container._mutually_exclusive_groups:
 | 
				
			||||||
            mutex_group = self.add_mutually_exclusive_group(required=group.required)
 | 
					            mutex_group = self.add_mutually_exclusive_group(
 | 
				
			||||||
 | 
					                required=group.required)
 | 
				
			||||||
            for action in group._group_actions:
 | 
					            for action in group._group_actions:
 | 
				
			||||||
                group_map[action] = mutex_group
 | 
					                group_map[action] = mutex_group
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -915,7 +933,8 @@ class _ActionsContainer(object):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def _handle_conflict_error(self, action, conflicting_actions):
 | 
					    def _handle_conflict_error(self, action, conflicting_actions):
 | 
				
			||||||
        message = _('conflicting option string(s): %s')
 | 
					        message = _('conflicting option string(s): %s')
 | 
				
			||||||
        conflict_string = ', '.join([option_string for option_string, action in conflicting_actions])
 | 
					        conflict_string = ', '.join(
 | 
				
			||||||
 | 
					            [option_string for option_string, action in conflicting_actions])
 | 
				
			||||||
        raise ArgumentError(action, message % conflict_string)
 | 
					        raise ArgumentError(action, message % conflict_string)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _handle_conflict_resolve(self, action, conflicting_actions):
 | 
					    def _handle_conflict_resolve(self, action, conflicting_actions):
 | 
				
			||||||
@@ -981,9 +1000,11 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
    def __init__(self, prog=None, usage=None, description=None, epilog=None, version=None, parents=[], formatter_class=HelpFormatter, prefix_chars='-', fromfile_prefix_chars=None, argument_default=None, conflict_handler='error', add_help=True):
 | 
					    def __init__(self, prog=None, usage=None, description=None, epilog=None, version=None, parents=[], formatter_class=HelpFormatter, prefix_chars='-', fromfile_prefix_chars=None, argument_default=None, conflict_handler='error', add_help=True):
 | 
				
			||||||
        if version is not None:
 | 
					        if version is not None:
 | 
				
			||||||
            import warnings
 | 
					            import warnings
 | 
				
			||||||
            warnings.warn('The "version" argument to ArgumentParser is deprecated. Please use "add_argument(..., action=\'version\', version="N", ...)" instead', DeprecationWarning)
 | 
					            warnings.warn(
 | 
				
			||||||
 | 
					                'The "version" argument to ArgumentParser is deprecated. Please use "add_argument(..., action=\'version\', version="N", ...)" instead', DeprecationWarning)
 | 
				
			||||||
        superinit = super(ArgumentParser, self).__init__
 | 
					        superinit = super(ArgumentParser, self).__init__
 | 
				
			||||||
        superinit(description=description, prefix_chars=prefix_chars, argument_default=argument_default, conflict_handler=conflict_handler)
 | 
					        superinit(description=description, prefix_chars=prefix_chars,
 | 
				
			||||||
 | 
					                  argument_default=argument_default, conflict_handler=conflict_handler)
 | 
				
			||||||
        if prog is None:
 | 
					        if prog is None:
 | 
				
			||||||
            prog = _os.path.basename(_sys.argv[0])
 | 
					            prog = _os.path.basename(_sys.argv[0])
 | 
				
			||||||
        self.prog = prog
 | 
					        self.prog = prog
 | 
				
			||||||
@@ -1004,9 +1025,11 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
        self.register('type', None, identity)
 | 
					        self.register('type', None, identity)
 | 
				
			||||||
        default_prefix = '-' if '-' in prefix_chars else prefix_chars[0]
 | 
					        default_prefix = '-' if '-' in prefix_chars else prefix_chars[0]
 | 
				
			||||||
        if self.add_help:
 | 
					        if self.add_help:
 | 
				
			||||||
            self.add_argument(default_prefix + 'h', default_prefix * 2 + 'help', action='help', default=SUPPRESS, help=_('show this help message and exit'))
 | 
					            self.add_argument(default_prefix + 'h', default_prefix * 2 + 'help',
 | 
				
			||||||
 | 
					                              action='help', default=SUPPRESS, help=_('show this help message and exit'))
 | 
				
			||||||
        if self.version:
 | 
					        if self.version:
 | 
				
			||||||
            self.add_argument(default_prefix + 'v', default_prefix * 2 + 'version', action='version', default=SUPPRESS, version=self.version, help=_("show program's version number and exit"))
 | 
					            self.add_argument(default_prefix + 'v', default_prefix * 2 + 'version', action='version',
 | 
				
			||||||
 | 
					                              default=SUPPRESS, version=self.version, help=_("show program's version number and exit"))
 | 
				
			||||||
        for parent in parents:
 | 
					        for parent in parents:
 | 
				
			||||||
            self._add_container_actions(parent)
 | 
					            self._add_container_actions(parent)
 | 
				
			||||||
            try:
 | 
					            try:
 | 
				
			||||||
@@ -1079,7 +1102,7 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
                if not hasattr(namespace, action.dest):
 | 
					                if not hasattr(namespace, action.dest):
 | 
				
			||||||
                    if action.default is not SUPPRESS:
 | 
					                    if action.default is not SUPPRESS:
 | 
				
			||||||
                        default = action.default
 | 
					                        default = action.default
 | 
				
			||||||
                        if isinstance(action.default, basestring):
 | 
					                        if isinstance(action.default, str):
 | 
				
			||||||
                            default = self._get_value(action, default)
 | 
					                            default = self._get_value(action, default)
 | 
				
			||||||
                        setattr(namespace, action.dest, default)
 | 
					                        setattr(namespace, action.dest, default)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1213,7 +1236,8 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
        else:
 | 
					        else:
 | 
				
			||||||
            max_option_string_index = -1
 | 
					            max_option_string_index = -1
 | 
				
			||||||
        while start_index <= max_option_string_index:
 | 
					        while start_index <= max_option_string_index:
 | 
				
			||||||
            next_option_string_index = min([index for index in option_string_indices if index >= start_index])
 | 
					            next_option_string_index = min(
 | 
				
			||||||
 | 
					                [index for index in option_string_indices if index >= start_index])
 | 
				
			||||||
            if start_index != next_option_string_index:
 | 
					            if start_index != next_option_string_index:
 | 
				
			||||||
                positionals_end_index = consume_positionals(start_index)
 | 
					                positionals_end_index = consume_positionals(start_index)
 | 
				
			||||||
                if positionals_end_index > start_index:
 | 
					                if positionals_end_index > start_index:
 | 
				
			||||||
@@ -1243,7 +1267,8 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
                    if action in seen_non_default_actions:
 | 
					                    if action in seen_non_default_actions:
 | 
				
			||||||
                        break
 | 
					                        break
 | 
				
			||||||
                else:
 | 
					                else:
 | 
				
			||||||
                    names = [_get_action_name(action) for action in group._group_actions if action.help is not SUPPRESS]
 | 
					                    names = [_get_action_name(
 | 
				
			||||||
 | 
					                        action) for action in group._group_actions if action.help is not SUPPRESS]
 | 
				
			||||||
                    msg = _('one of the arguments %s is required')
 | 
					                    msg = _('one of the arguments %s is required')
 | 
				
			||||||
                    self.error(msg % ' '.join(names))
 | 
					                    self.error(msg % ' '.join(names))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1293,7 +1318,8 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
        result = []
 | 
					        result = []
 | 
				
			||||||
        for i in range(len(actions), 0, -1):
 | 
					        for i in range(len(actions), 0, -1):
 | 
				
			||||||
            actions_slice = actions[:i]
 | 
					            actions_slice = actions[:i]
 | 
				
			||||||
            pattern = ''.join([self._get_nargs_pattern(action) for action in actions_slice])
 | 
					            pattern = ''.join([self._get_nargs_pattern(action)
 | 
				
			||||||
 | 
					                              for action in actions_slice])
 | 
				
			||||||
            match = _re.match(pattern, arg_strings_pattern)
 | 
					            match = _re.match(pattern, arg_strings_pattern)
 | 
				
			||||||
            if match is not None:
 | 
					            if match is not None:
 | 
				
			||||||
                result.extend([len(string) for string in match.groups()])
 | 
					                result.extend([len(string) for string in match.groups()])
 | 
				
			||||||
@@ -1319,7 +1345,8 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
                    return (action, option_string, explicit_arg)
 | 
					                    return (action, option_string, explicit_arg)
 | 
				
			||||||
            option_tuples = self._get_option_tuples(arg_string)
 | 
					            option_tuples = self._get_option_tuples(arg_string)
 | 
				
			||||||
            if len(option_tuples) > 1:
 | 
					            if len(option_tuples) > 1:
 | 
				
			||||||
                options = ', '.join([option_string for action, option_string, explicit_arg in option_tuples])
 | 
					                options = ', '.join(
 | 
				
			||||||
 | 
					                    [option_string for action, option_string, explicit_arg in option_tuples])
 | 
				
			||||||
                tup = (arg_string, options)
 | 
					                tup = (arg_string, options)
 | 
				
			||||||
                self.error(_('ambiguous option: %s could match %s') % tup)
 | 
					                self.error(_('ambiguous option: %s could match %s') % tup)
 | 
				
			||||||
            elif len(option_tuples) == 1:
 | 
					            elif len(option_tuples) == 1:
 | 
				
			||||||
@@ -1396,7 +1423,7 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
                value = action.const
 | 
					                value = action.const
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                value = action.default
 | 
					                value = action.default
 | 
				
			||||||
            if isinstance(value, basestring):
 | 
					            if isinstance(value, str):
 | 
				
			||||||
                value = self._get_value(action, value)
 | 
					                value = self._get_value(action, value)
 | 
				
			||||||
                self._check_value(action, value)
 | 
					                self._check_value(action, value)
 | 
				
			||||||
        elif not arg_strings and action.nargs == ZERO_OR_MORE and not action.option_strings:
 | 
					        elif not arg_strings and action.nargs == ZERO_OR_MORE and not action.option_strings:
 | 
				
			||||||
@@ -1448,12 +1475,14 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def format_usage(self):
 | 
					    def format_usage(self):
 | 
				
			||||||
        formatter = self._get_formatter()
 | 
					        formatter = self._get_formatter()
 | 
				
			||||||
        formatter.add_usage(self.usage, self._actions, self._mutually_exclusive_groups)
 | 
					        formatter.add_usage(self.usage, self._actions,
 | 
				
			||||||
 | 
					                            self._mutually_exclusive_groups)
 | 
				
			||||||
        return formatter.format_help()
 | 
					        return formatter.format_help()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def format_help(self):
 | 
					    def format_help(self):
 | 
				
			||||||
        formatter = self._get_formatter()
 | 
					        formatter = self._get_formatter()
 | 
				
			||||||
        formatter.add_usage(self.usage, self._actions, self._mutually_exclusive_groups)
 | 
					        formatter.add_usage(self.usage, self._actions,
 | 
				
			||||||
 | 
					                            self._mutually_exclusive_groups)
 | 
				
			||||||
        formatter.add_text(self.description)
 | 
					        formatter.add_text(self.description)
 | 
				
			||||||
        for action_group in self._action_groups:
 | 
					        for action_group in self._action_groups:
 | 
				
			||||||
            formatter.start_section(action_group.title)
 | 
					            formatter.start_section(action_group.title)
 | 
				
			||||||
@@ -1466,7 +1495,8 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def format_version(self):
 | 
					    def format_version(self):
 | 
				
			||||||
        import warnings
 | 
					        import warnings
 | 
				
			||||||
        warnings.warn('The format_version method is deprecated -- the "version" argument to ArgumentParser is no longer supported.', DeprecationWarning)
 | 
					        warnings.warn(
 | 
				
			||||||
 | 
					            'The format_version method is deprecated -- the "version" argument to ArgumentParser is no longer supported.', DeprecationWarning)
 | 
				
			||||||
        formatter = self._get_formatter()
 | 
					        formatter = self._get_formatter()
 | 
				
			||||||
        formatter.add_text(self.version)
 | 
					        formatter.add_text(self.version)
 | 
				
			||||||
        return formatter.format_help()
 | 
					        return formatter.format_help()
 | 
				
			||||||
@@ -1488,7 +1518,8 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def print_version(self, file=None):
 | 
					    def print_version(self, file=None):
 | 
				
			||||||
        import warnings
 | 
					        import warnings
 | 
				
			||||||
        warnings.warn('The print_version method is deprecated -- the "version" argument to ArgumentParser is no longer supported.', DeprecationWarning)
 | 
					        warnings.warn(
 | 
				
			||||||
 | 
					            'The print_version method is deprecated -- the "version" argument to ArgumentParser is no longer supported.', DeprecationWarning)
 | 
				
			||||||
        self._print_message(self.format_version(), file)
 | 
					        self._print_message(self.format_version(), file)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _print_message(self, message, file=None):
 | 
					    def _print_message(self, message, file=None):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,16 +17,18 @@ class ubi:
 | 
				
			|||||||
        self._block_count = len(self.blocks)
 | 
					        self._block_count = len(self.blocks)
 | 
				
			||||||
        if self._block_count <= 0:
 | 
					        if self._block_count <= 0:
 | 
				
			||||||
            raise Exception('No blocks found.')
 | 
					            raise Exception('No blocks found.')
 | 
				
			||||||
        layout_list, data_list, int_vol_list, unknown_list = sort.by_type(self.blocks)
 | 
					        layout_list, data_list, int_vol_list, unknown_list = sort.by_type(
 | 
				
			||||||
 | 
					            self.blocks)
 | 
				
			||||||
        self._layout_blocks_list = layout_list
 | 
					        self._layout_blocks_list = layout_list
 | 
				
			||||||
        self._data_blocks_list = data_list
 | 
					        self._data_blocks_list = data_list
 | 
				
			||||||
        self._int_vol_blocks_list = int_vol_list
 | 
					        self._int_vol_blocks_list = int_vol_list
 | 
				
			||||||
        self._unknown_blocks_list = unknown_list
 | 
					        self._unknown_blocks_list = unknown_list
 | 
				
			||||||
        arbitrary_block = self.blocks.itervalues().next()
 | 
					        arbitrary_block = next(iter(self.blocks.values()))
 | 
				
			||||||
        self._min_io_size = arbitrary_block.ec_hdr.vid_hdr_offset
 | 
					        self._min_io_size = arbitrary_block.ec_hdr.vid_hdr_offset
 | 
				
			||||||
        self._leb_size = self.file.block_size - arbitrary_block.ec_hdr.data_offset
 | 
					        self._leb_size = self.file.block_size - arbitrary_block.ec_hdr.data_offset
 | 
				
			||||||
        layout_pairs = layout.group_pairs(self.blocks, self.layout_blocks_list)
 | 
					        layout_pairs = layout.group_pairs(self.blocks, self.layout_blocks_list)
 | 
				
			||||||
        layout_infos = layout.associate_blocks(self.blocks, layout_pairs, self.first_peb_num)
 | 
					        layout_infos = layout.associate_blocks(
 | 
				
			||||||
 | 
					            self.blocks, layout_pairs, self.first_peb_num)
 | 
				
			||||||
        self._images = []
 | 
					        self._images = []
 | 
				
			||||||
        for i in range(0, len(layout_infos)):
 | 
					        for i in range(0, len(layout_infos)):
 | 
				
			||||||
            self._images.append(image(self.blocks, layout_infos[i]))
 | 
					            self._images.append(image(self.blocks, layout_infos[i]))
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,10 +17,12 @@ class description(object):
 | 
				
			|||||||
        self.vtbl_recs = []
 | 
					        self.vtbl_recs = []
 | 
				
			||||||
        self.ec_hdr = extract_ec_hdr(block_buf[0:UBI_EC_HDR_SZ])
 | 
					        self.ec_hdr = extract_ec_hdr(block_buf[0:UBI_EC_HDR_SZ])
 | 
				
			||||||
        if not self.ec_hdr.errors:
 | 
					        if not self.ec_hdr.errors:
 | 
				
			||||||
            self.vid_hdr = extract_vid_hdr(block_buf[self.ec_hdr.vid_hdr_offset:self.ec_hdr.vid_hdr_offset + UBI_VID_HDR_SZ])
 | 
					            self.vid_hdr = extract_vid_hdr(
 | 
				
			||||||
 | 
					                block_buf[self.ec_hdr.vid_hdr_offset:self.ec_hdr.vid_hdr_offset + UBI_VID_HDR_SZ])
 | 
				
			||||||
            self.is_internal_vol = self.vid_hdr.vol_id >= UBI_INTERNAL_VOL_START
 | 
					            self.is_internal_vol = self.vid_hdr.vol_id >= UBI_INTERNAL_VOL_START
 | 
				
			||||||
            if self.vid_hdr.vol_id >= UBI_INTERNAL_VOL_START:
 | 
					            if self.vid_hdr.vol_id >= UBI_INTERNAL_VOL_START:
 | 
				
			||||||
                self.vtbl_recs = extract_vtbl_rec(block_buf[self.ec_hdr.data_offset:])
 | 
					                self.vtbl_recs = extract_vtbl_rec(
 | 
				
			||||||
 | 
					                    block_buf[self.ec_hdr.data_offset:])
 | 
				
			||||||
            self.leb_num = self.vid_hdr.lnum
 | 
					            self.leb_num = self.vid_hdr.lnum
 | 
				
			||||||
        self.is_vtbl = bool(self.vtbl_recs) or False
 | 
					        self.is_vtbl = bool(self.vtbl_recs) or False
 | 
				
			||||||
        self.is_valid = not self.ec_hdr.errors and not self.vid_hdr.errors
 | 
					        self.is_valid = not self.ec_hdr.errors and not self.vid_hdr.errors
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,7 +18,8 @@ def group_pairs(blocks, layout_blocks_list):
 | 
				
			|||||||
def associate_blocks(blocks, layout_pairs, start_peb_num):
 | 
					def associate_blocks(blocks, layout_pairs, start_peb_num):
 | 
				
			||||||
    seq_blocks = []
 | 
					    seq_blocks = []
 | 
				
			||||||
    for layout_pair in layout_pairs:
 | 
					    for layout_pair in layout_pairs:
 | 
				
			||||||
        seq_blocks = sort.by_image_seq(blocks, blocks[layout_pair[0]].ec_hdr.image_seq)
 | 
					        seq_blocks = sort.by_image_seq(
 | 
				
			||||||
 | 
					            blocks, blocks[layout_pair[0]].ec_hdr.image_seq)
 | 
				
			||||||
        layout_pair.append(seq_blocks)
 | 
					        layout_pair.append(seq_blocks)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return layout_pairs
 | 
					    return layout_pairs
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,7 +18,7 @@ def by_image_seq(blocks, image_seq):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def by_range(blocks, block_range):
 | 
					def by_range(blocks, block_range):
 | 
				
			||||||
    peb_range = range(block_range[0], block_range[1])
 | 
					    peb_range = list(range(block_range[0], block_range[1]))
 | 
				
			||||||
    return [i for i in blocks if i in peb_range]
 | 
					    return [i for i in blocks if i in peb_range]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -33,7 +33,7 @@ def by_leb(blocks):
 | 
				
			|||||||
        slist[blocks[block].leb_num] = block
 | 
					        slist[blocks[block].leb_num] = block
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return slist
 | 
					    return slist
 | 
				
			||||||
    return sorted(blocks.iterkeys(), key=lambda x: blocks[x].leb_num)
 | 
					    return sorted(iter(blocks.keys()), key=lambda x: blocks[x].leb_num)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def by_vol_id(blocks, slist=None):
 | 
					def by_vol_id(blocks, slist=None):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
#!/usr/bin/python
 | 
					#!/usr/bin/python
 | 
				
			||||||
import struct
 | 
					import struct
 | 
				
			||||||
UBI_CRC32_INIT = 4294967295L
 | 
					UBI_CRC32_INIT = 4294967295
 | 
				
			||||||
UBI_MAX_VOLUMES = 128
 | 
					UBI_MAX_VOLUMES = 128
 | 
				
			||||||
UBI_INTERNAL_VOL_START = 2147479551
 | 
					UBI_INTERNAL_VOL_START = 2147479551
 | 
				
			||||||
UBI_EC_HDR_MAGIC = 'UBI#'
 | 
					UBI_EC_HDR_MAGIC = 'UBI#'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,77 +3,79 @@ from ubi.defines import PRINT_COMPAT_LIST, PRINT_VOL_TYPE_LIST, UBI_VTBL_AUTORES
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def ubi(ubi, tab=''):
 | 
					def ubi(ubi, tab=''):
 | 
				
			||||||
    print '%sUBI File' % tab
 | 
					    print(('%sUBI File' % tab))
 | 
				
			||||||
    print '%s---------------------' % tab
 | 
					    print(('%s---------------------' % tab))
 | 
				
			||||||
    print '\t%sMin I/O: %s' % (tab, ubi.min_io_size)
 | 
					    print(('\t%sMin I/O: %s' % (tab, ubi.min_io_size)))
 | 
				
			||||||
    print '\t%sLEB Size: %s' % (tab, ubi.leb_size)
 | 
					    print(('\t%sLEB Size: %s' % (tab, ubi.leb_size)))
 | 
				
			||||||
    print '\t%sPEB Size: %s' % (tab, ubi.peb_size)
 | 
					    print(('\t%sPEB Size: %s' % (tab, ubi.peb_size)))
 | 
				
			||||||
    print '\t%sTotal Block Count: %s' % (tab, ubi.block_count)
 | 
					    print(('\t%sTotal Block Count: %s' % (tab, ubi.block_count)))
 | 
				
			||||||
    print '\t%sData Block Count: %s' % (tab, len(ubi.data_blocks_list))
 | 
					    print(('\t%sData Block Count: %s' % (tab, len(ubi.data_blocks_list))))
 | 
				
			||||||
    print '\t%sLayout Block Count: %s' % (tab, len(ubi.layout_blocks_list))
 | 
					    print(('\t%sLayout Block Count: %s' % (tab, len(ubi.layout_blocks_list))))
 | 
				
			||||||
    print '\t%sInternal Volume Block Count: %s' % (tab, len(ubi.int_vol_blocks_list))
 | 
					    print(('\t%sInternal Volume Block Count: %s' %
 | 
				
			||||||
    print '\t%sUnknown Block Count: %s' % (tab, len(ubi.unknown_blocks_list))
 | 
					          (tab, len(ubi.int_vol_blocks_list))))
 | 
				
			||||||
    print '\t%sFirst UBI PEB Number: %s' % (tab, ubi.first_peb_num)
 | 
					    print(('\t%sUnknown Block Count: %s' % (tab, len(ubi.unknown_blocks_list))))
 | 
				
			||||||
 | 
					    print(('\t%sFirst UBI PEB Number: %s' % (tab, ubi.first_peb_num)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def image(image, tab=''):
 | 
					def image(image, tab=''):
 | 
				
			||||||
    print '%s%s' % (tab, image)
 | 
					    print(('%s%s' % (tab, image)))
 | 
				
			||||||
    print '%s---------------------' % tab
 | 
					    print(('%s---------------------' % tab))
 | 
				
			||||||
    print '\t%sImage Sequence Num: %s' % (tab, image.image_seq)
 | 
					    print(('\t%sImage Sequence Num: %s' % (tab, image.image_seq)))
 | 
				
			||||||
    for volume in image.volumes:
 | 
					    for volume in image.volumes:
 | 
				
			||||||
        print '\t%sVolume Name:%s' % (tab, volume)
 | 
					        print(('\t%sVolume Name:%s' % (tab, volume)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    print '\t%sPEB Range: %s - %s' % (tab, image.peb_range[0], image.peb_range[1])
 | 
					    print(('\t%sPEB Range: %s - %s' %
 | 
				
			||||||
 | 
					          (tab, image.peb_range[0], image.peb_range[1])))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def volume(volume, tab=''):
 | 
					def volume(volume, tab=''):
 | 
				
			||||||
    print '%s%s' % (tab, volume)
 | 
					    print(('%s%s' % (tab, volume)))
 | 
				
			||||||
    print '%s---------------------' % tab
 | 
					    print(('%s---------------------' % tab))
 | 
				
			||||||
    print '\t%sVol ID: %s' % (tab, volume.vol_id)
 | 
					    print(('\t%sVol ID: %s' % (tab, volume.vol_id)))
 | 
				
			||||||
    print '\t%sName: %s' % (tab, volume.name)
 | 
					    print(('\t%sName: %s' % (tab, volume.name)))
 | 
				
			||||||
    print '\t%sBlock Count: %s' % (tab, volume.block_count)
 | 
					    print(('\t%sBlock Count: %s' % (tab, volume.block_count)))
 | 
				
			||||||
    print '\n'
 | 
					    print('\n')
 | 
				
			||||||
    print '\t%sVolume Record' % tab
 | 
					    print(('\t%sVolume Record' % tab))
 | 
				
			||||||
    print '\t%s---------------------' % tab
 | 
					    print(('\t%s---------------------' % tab))
 | 
				
			||||||
    vol_rec(volume.vol_rec, '\t\t%s' % tab)
 | 
					    vol_rec(volume.vol_rec, '\t\t%s' % tab)
 | 
				
			||||||
    print '\n'
 | 
					    print('\n')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def block(block, tab='\t'):
 | 
					def block(block, tab='\t'):
 | 
				
			||||||
    print '%s%s' % (tab, block)
 | 
					    print(('%s%s' % (tab, block)))
 | 
				
			||||||
    print '%s---------------------' % tab
 | 
					    print(('%s---------------------' % tab))
 | 
				
			||||||
    print '\t%sFile Offset: %s' % (tab, block.file_offset)
 | 
					    print(('\t%sFile Offset: %s' % (tab, block.file_offset)))
 | 
				
			||||||
    print '\t%sPEB #: %s' % (tab, block.peb_num)
 | 
					    print(('\t%sPEB #: %s' % (tab, block.peb_num)))
 | 
				
			||||||
    print '\t%sLEB #: %s' % (tab, block.leb_num)
 | 
					    print(('\t%sLEB #: %s' % (tab, block.leb_num)))
 | 
				
			||||||
    print '\t%sBlock Size: %s' % (tab, block.size)
 | 
					    print(('\t%sBlock Size: %s' % (tab, block.size)))
 | 
				
			||||||
    print '\t%sInternal Volume: %s' % (tab, block.is_internal_vol)
 | 
					    print(('\t%sInternal Volume: %s' % (tab, block.is_internal_vol)))
 | 
				
			||||||
    print '\t%sIs Volume Table: %s' % (tab, block.is_vtbl)
 | 
					    print(('\t%sIs Volume Table: %s' % (tab, block.is_vtbl)))
 | 
				
			||||||
    print '\t%sIs Valid: %s' % (tab, block.is_valid)
 | 
					    print(('\t%sIs Valid: %s' % (tab, block.is_valid)))
 | 
				
			||||||
    if not block.ec_hdr.errors:
 | 
					    if not block.ec_hdr.errors:
 | 
				
			||||||
        print '\n'
 | 
					        print('\n')
 | 
				
			||||||
        print '\t%sErase Count Header' % tab
 | 
					        print(('\t%sErase Count Header' % tab))
 | 
				
			||||||
        print '\t%s---------------------' % tab
 | 
					        print(('\t%s---------------------' % tab))
 | 
				
			||||||
        ec_hdr(block.ec_hdr, '\t\t%s' % tab)
 | 
					        ec_hdr(block.ec_hdr, '\t\t%s' % tab)
 | 
				
			||||||
    if block.vid_hdr and not block.vid_hdr.errors:
 | 
					    if block.vid_hdr and not block.vid_hdr.errors:
 | 
				
			||||||
        print '\n'
 | 
					        print('\n')
 | 
				
			||||||
        print '\t%sVID Header Header' % tab
 | 
					        print(('\t%sVID Header Header' % tab))
 | 
				
			||||||
        print '\t%s---------------------' % tab
 | 
					        print(('\t%s---------------------' % tab))
 | 
				
			||||||
        vid_hdr(block.vid_hdr, '\t\t%s' % tab)
 | 
					        vid_hdr(block.vid_hdr, '\t\t%s' % tab)
 | 
				
			||||||
    if block.vtbl_recs:
 | 
					    if block.vtbl_recs:
 | 
				
			||||||
        print '\n'
 | 
					        print('\n')
 | 
				
			||||||
        print '\t%sVolume Records' % tab
 | 
					        print(('\t%sVolume Records' % tab))
 | 
				
			||||||
        print '\t%s---------------------' % tab
 | 
					        print(('\t%s---------------------' % tab))
 | 
				
			||||||
        for vol in block.vtbl_recs:
 | 
					        for vol in block.vtbl_recs:
 | 
				
			||||||
            vol_rec(vol, '\t\t%s' % tab)
 | 
					            vol_rec(vol, '\t\t%s' % tab)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    print '\n'
 | 
					    print('\n')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def ec_hdr(ec_hdr, tab=''):
 | 
					def ec_hdr(ec_hdr, tab=''):
 | 
				
			||||||
    for key, value in ec_hdr:
 | 
					    for key, value in ec_hdr:
 | 
				
			||||||
        if key == 'errors':
 | 
					        if key == 'errors':
 | 
				
			||||||
            value = ','.join(value)
 | 
					            value = ','.join(value)
 | 
				
			||||||
        print '%s%s: %r' % (tab, key, value)
 | 
					        print(('%s%s: %r' % (tab, key, value)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def vid_hdr(vid_hdr, tab=''):
 | 
					def vid_hdr(vid_hdr, tab=''):
 | 
				
			||||||
@@ -90,7 +92,7 @@ def vid_hdr(vid_hdr, tab=''):
 | 
				
			|||||||
                value = PRINT_VOL_TYPE_LIST[value]
 | 
					                value = PRINT_VOL_TYPE_LIST[value]
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                value = -1
 | 
					                value = -1
 | 
				
			||||||
        print '%s%s: %s' % (tab, key, value)
 | 
					        print(('%s%s: %s' % (tab, key, value)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def vol_rec(vol_rec, tab=''):
 | 
					def vol_rec(vol_rec, tab=''):
 | 
				
			||||||
@@ -106,4 +108,4 @@ def vol_rec(vol_rec, tab=''):
 | 
				
			|||||||
            value = 'autoresize'
 | 
					            value = 'autoresize'
 | 
				
			||||||
        elif key == 'name':
 | 
					        elif key == 'name':
 | 
				
			||||||
            value = value.strip('\x00')
 | 
					            value = value.strip('\x00')
 | 
				
			||||||
        print '%s%s: %s' % (tab, key, value)
 | 
					        print(('%s%s: %s' % (tab, key, value)))
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,7 +7,8 @@ from ubi.headers import errors
 | 
				
			|||||||
class ec_hdr(object):
 | 
					class ec_hdr(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(EC_HDR_FIELDS, struct.unpack(EC_HDR_FORMAT, buf)))
 | 
					        fields = dict(
 | 
				
			||||||
 | 
					            list(zip(EC_HDR_FIELDS, struct.unpack(EC_HDR_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            setattr(self, key, fields[key])
 | 
					            setattr(self, key, fields[key])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -25,7 +26,8 @@ class ec_hdr(object):
 | 
				
			|||||||
class vid_hdr(object):
 | 
					class vid_hdr(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(VID_HDR_FIELDS, struct.unpack(VID_HDR_FORMAT, buf)))
 | 
					        fields = dict(
 | 
				
			||||||
 | 
					            list(zip(VID_HDR_FIELDS, struct.unpack(VID_HDR_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            setattr(self, key, fields[key])
 | 
					            setattr(self, key, fields[key])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -43,7 +45,8 @@ class vid_hdr(object):
 | 
				
			|||||||
class vtbl_rec(object):
 | 
					class vtbl_rec(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(VTBL_REC_FIELDS, struct.unpack(VTBL_REC_FORMAT, buf)))
 | 
					        fields = dict(
 | 
				
			||||||
 | 
					            list(zip(VTBL_REC_FIELDS, struct.unpack(VTBL_REC_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            setattr(self, key, fields[key])
 | 
					            setattr(self, key, fields[key])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,14 +4,14 @@ from ubi.defines import *
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def ec_hdr(ec_hdr, buf):
 | 
					def ec_hdr(ec_hdr, buf):
 | 
				
			||||||
    if ec_hdr.hdr_crc != ~crc32(buf[:-4]) & 4294967295L:
 | 
					    if ec_hdr.hdr_crc != ~crc32(buf[:-4]) & 4294967295:
 | 
				
			||||||
        ec_hdr.errors.append('crc')
 | 
					        ec_hdr.errors.append('crc')
 | 
				
			||||||
    return ec_hdr
 | 
					    return ec_hdr
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def vid_hdr(vid_hdr, buf):
 | 
					def vid_hdr(vid_hdr, buf):
 | 
				
			||||||
    vid_hdr.errors = []
 | 
					    vid_hdr.errors = []
 | 
				
			||||||
    if vid_hdr.hdr_crc != ~crc32(buf[:-4]) & 4294967295L:
 | 
					    if vid_hdr.hdr_crc != ~crc32(buf[:-4]) & 4294967295:
 | 
				
			||||||
        vid_hdr.errors.append('crc')
 | 
					        vid_hdr.errors.append('crc')
 | 
				
			||||||
    return vid_hdr
 | 
					    return vid_hdr
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -22,7 +22,7 @@ def vtbl_rec(vtbl_rec, buf):
 | 
				
			|||||||
        likely_vtbl = False
 | 
					        likely_vtbl = False
 | 
				
			||||||
    elif vtbl_rec.vol_type not in (1, 2):
 | 
					    elif vtbl_rec.vol_type not in (1, 2):
 | 
				
			||||||
        likely_vtbl = False
 | 
					        likely_vtbl = False
 | 
				
			||||||
    if vtbl_rec.crc != ~crc32(buf[:-4]) & 4294967295L:
 | 
					    if vtbl_rec.crc != ~crc32(buf[:-4]) & 4294967295:
 | 
				
			||||||
        vtbl_rec.errors.append('crc')
 | 
					        vtbl_rec.errors.append('crc')
 | 
				
			||||||
    if not likely_vtbl:
 | 
					    if not likely_vtbl:
 | 
				
			||||||
        vtbl_rec.errors = ['False']
 | 
					        vtbl_rec.errors = ['False']
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,7 +18,7 @@ class description(object):
 | 
				
			|||||||
        return 'Image: %s' % self.image_seq
 | 
					        return 'Image: %s' % self.image_seq
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def get_blocks(self, blocks):
 | 
					    def get_blocks(self, blocks):
 | 
				
			||||||
        return get_blocks_in_list(blocks, range(self._start_peb, self._end_peb + 1))
 | 
					        return get_blocks_in_list(blocks, list(range(self._start_peb, self._end_peb + 1)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _get_peb_range(self):
 | 
					    def _get_peb_range(self):
 | 
				
			||||||
        return [self._start_peb, self._end_peb]
 | 
					        return [self._start_peb, self._end_peb]
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -63,6 +63,7 @@ def get_volumes(blocks, layout_info):
 | 
				
			|||||||
        vol_name = vol_rec.name.strip('\x00')
 | 
					        vol_name = vol_rec.name.strip('\x00')
 | 
				
			||||||
        if vol_rec.rec_index not in vol_blocks_lists:
 | 
					        if vol_rec.rec_index not in vol_blocks_lists:
 | 
				
			||||||
            vol_blocks_lists[vol_rec.rec_index] = []
 | 
					            vol_blocks_lists[vol_rec.rec_index] = []
 | 
				
			||||||
        volumes[vol_name] = description(vol_rec.rec_index, vol_rec, vol_blocks_lists[vol_rec.rec_index])
 | 
					        volumes[vol_name] = description(
 | 
				
			||||||
 | 
					            vol_rec.rec_index, vol_rec, vol_blocks_lists[vol_rec.rec_index])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return volumes
 | 
					    return volumes
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import os
 | 
					import os
 | 
				
			||||||
import sys
 | 
					import sys
 | 
				
			||||||
#import argparse_neo
 | 
					# import argparse_neo
 | 
				
			||||||
try:
 | 
					try:
 | 
				
			||||||
    import argparse
 | 
					    import argparse
 | 
				
			||||||
except:
 | 
					except:
 | 
				
			||||||
@@ -12,19 +12,26 @@ from ubifs import ubifs
 | 
				
			|||||||
from ubi_io import ubi_file, leb_virtual_file
 | 
					from ubi_io import ubi_file, leb_virtual_file
 | 
				
			||||||
from ui.common import extract_files, output_dir
 | 
					from ui.common import extract_files, output_dir
 | 
				
			||||||
if __name__ == '__main__':
 | 
					if __name__ == '__main__':
 | 
				
			||||||
    os.system('echo "\n[NeoBoot] Zip file unzipped.\nInstallation in progress, please wait ..."')
 | 
					    os.system(
 | 
				
			||||||
 | 
					        'echo "\n[NeoBoot] Zip file unzipped.\nInstallation in progress, please wait ..."')
 | 
				
			||||||
    description = 'Extract contents of UBI image.'
 | 
					    description = 'Extract contents of UBI image.'
 | 
				
			||||||
    usage = 'ubi_extract_files.py [options] filepath'
 | 
					    usage = 'ubi_extract_files.py [options] filepath'
 | 
				
			||||||
#    parser = argparse_neo.ArgumentParser(usage=usage, description=description)
 | 
					#    parser = argparse_neo.ArgumentParser(usage=usage, description=description)
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        parser = argparse.ArgumentParser(usage=usage, description=description)
 | 
					        parser = argparse.ArgumentParser(usage=usage, description=description)
 | 
				
			||||||
    except:
 | 
					    except:
 | 
				
			||||||
        parser = argparse_neo.ArgumentParser(usage=usage, description=description)
 | 
					        parser = argparse_neo.ArgumentParser(
 | 
				
			||||||
    parser.add_argument('-l', '--log-file', dest='logpath', help='Log output to file output/LOGPATH. (default: ubifs_output.log)')
 | 
					            usage=usage, description=description)
 | 
				
			||||||
    parser.add_argument('-k', '--keep-permissions', action='store_true', dest='permissions', help='Maintain file permissions, requires running as root. (default: False)')
 | 
					    parser.add_argument('-l', '--log-file', dest='logpath',
 | 
				
			||||||
    parser.add_argument('-q', '--quiet', action='store_true', dest='quiet', help='Suppress warnings and non-fatal errors. (default: False)')
 | 
					                        help='Log output to file output/LOGPATH. (default: ubifs_output.log)')
 | 
				
			||||||
    parser.add_argument('-p', '--peb-size', type=int, dest='block_size', help='Specify PEB size.')
 | 
					    parser.add_argument('-k', '--keep-permissions', action='store_true', dest='permissions',
 | 
				
			||||||
    parser.add_argument('-o', '--output-dir', dest='output_path', help='Specify output directory path.')
 | 
					                        help='Maintain file permissions, requires running as root. (default: False)')
 | 
				
			||||||
 | 
					    parser.add_argument('-q', '--quiet', action='store_true', dest='quiet',
 | 
				
			||||||
 | 
					                        help='Suppress warnings and non-fatal errors. (default: False)')
 | 
				
			||||||
 | 
					    parser.add_argument('-p', '--peb-size', type=int,
 | 
				
			||||||
 | 
					                        dest='block_size', help='Specify PEB size.')
 | 
				
			||||||
 | 
					    parser.add_argument('-o', '--output-dir', dest='output_path',
 | 
				
			||||||
 | 
					                        help='Specify output directory path.')
 | 
				
			||||||
    parser.add_argument('filepath', help='File to extract contents of.')
 | 
					    parser.add_argument('filepath', help='File to extract contents of.')
 | 
				
			||||||
    if len(sys.argv) == 1:
 | 
					    if len(sys.argv) == 1:
 | 
				
			||||||
        parser.print_help()
 | 
					        parser.print_help()
 | 
				
			||||||
@@ -61,13 +68,14 @@ if __name__ == '__main__':
 | 
				
			|||||||
            if not os.path.exists(vol_out_path):
 | 
					            if not os.path.exists(vol_out_path):
 | 
				
			||||||
                os.makedirs(vol_out_path)
 | 
					                os.makedirs(vol_out_path)
 | 
				
			||||||
            elif os.listdir(vol_out_path):
 | 
					            elif os.listdir(vol_out_path):
 | 
				
			||||||
                parser.error('Volume output directory is not empty. %s' % vol_out_path)
 | 
					                parser.error(
 | 
				
			||||||
 | 
					                    'Volume output directory is not empty. %s' % vol_out_path)
 | 
				
			||||||
            ufsfile = leb_virtual_file(uubi, image.volumes[volume])
 | 
					            ufsfile = leb_virtual_file(uubi, image.volumes[volume])
 | 
				
			||||||
            uubifs = ubifs(ufsfile)
 | 
					            uubifs = ubifs(ufsfile)
 | 
				
			||||||
            uubifs.log.log_file = log_file
 | 
					            uubifs.log.log_file = log_file
 | 
				
			||||||
            uubifs.log.log_to_file = log_to_file
 | 
					            uubifs.log.log_to_file = log_to_file
 | 
				
			||||||
            uubifs.log.quiet = quiet
 | 
					            uubifs.log.quiet = quiet
 | 
				
			||||||
           print "Wait almost over ...\nLoading the image to: %s" % vol_out_path
 | 
					            print("Wait almost over ...\nLoading the image to: %s" % vol_out_path)
 | 
				
			||||||
            extract_files(uubifs, vol_out_path, perms)
 | 
					            extract_files(uubifs, vol_out_path, perms)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    sys.exit(0)
 | 
					    sys.exit(0)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -68,7 +68,8 @@ class ubi_file(object):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def read_block_data(self, block):
 | 
					    def read_block_data(self, block):
 | 
				
			||||||
        self.seek(block.file_offset + block.ec_hdr.data_offset)
 | 
					        self.seek(block.file_offset + block.ec_hdr.data_offset)
 | 
				
			||||||
        buf = self._fhandle.read(block.size - block.ec_hdr.data_offset - block.vid_hdr.data_pad)
 | 
					        buf = self._fhandle.read(
 | 
				
			||||||
 | 
					            block.size - block.ec_hdr.data_offset - block.vid_hdr.data_pad)
 | 
				
			||||||
        return buf
 | 
					        return buf
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -91,7 +92,8 @@ class leb_virtual_file:
 | 
				
			|||||||
            self.seek(self.tell() + i)
 | 
					            self.seek(self.tell() + i)
 | 
				
			||||||
            return self._last_buf[offset:offset + i]
 | 
					            return self._last_buf[offset:offset + i]
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            buf = self._ubi.file.read_block_data(self._ubi.blocks[self._blocks[leb]])
 | 
					            buf = self._ubi.file.read_block_data(
 | 
				
			||||||
 | 
					                self._ubi.blocks[self._blocks[leb]])
 | 
				
			||||||
            self._last_buf = buf
 | 
					            self._last_buf = buf
 | 
				
			||||||
            self._last_leb = leb
 | 
					            self._last_leb = leb
 | 
				
			||||||
            self.seek(self.tell() + i)
 | 
					            self.seek(self.tell() + i)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
#!/usr/bin/python
 | 
					#!/usr/bin/python
 | 
				
			||||||
import struct
 | 
					import struct
 | 
				
			||||||
UBIFS_NODE_MAGIC = '1\x18\x10\x06'
 | 
					UBIFS_NODE_MAGIC = '1\x18\x10\x06'
 | 
				
			||||||
UBIFS_CRC32_INIT = 4294967295L
 | 
					UBIFS_CRC32_INIT = 4294967295
 | 
				
			||||||
UBIFS_MIN_COMPR_LEN = 128
 | 
					UBIFS_MIN_COMPR_LEN = 128
 | 
				
			||||||
UBIFS_MIN_COMPRESS_DIFF = 64
 | 
					UBIFS_MIN_COMPRESS_DIFF = 64
 | 
				
			||||||
UBIFS_ROOT_INO = 1
 | 
					UBIFS_ROOT_INO = 1
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -19,7 +19,7 @@ class log:
 | 
				
			|||||||
                    f.write('%s\n' % s)
 | 
					                    f.write('%s\n' % s)
 | 
				
			||||||
                f.close()
 | 
					                f.close()
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                print '%s' % s
 | 
					                print(('%s' % s))
 | 
				
			||||||
        if self.exit_on_except:
 | 
					        if self.exit_on_except:
 | 
				
			||||||
            sys.exit()
 | 
					            sys.exit()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
#!/usr/bin/python
 | 
					#!/usr/bin/python
 | 
				
			||||||
#import lzo
 | 
					# import lzo
 | 
				
			||||||
import struct
 | 
					import struct
 | 
				
			||||||
import zlib
 | 
					import zlib
 | 
				
			||||||
from ubifs.defines import *
 | 
					from ubifs.defines import *
 | 
				
			||||||
@@ -39,8 +39,8 @@ def parse_key(key):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def decompress(ctype, unc_len, data):
 | 
					def decompress(ctype, unc_len, data):
 | 
				
			||||||
    #if ctype == UBIFS_COMPR_LZO:
 | 
					    # if ctype == UBIFS_COMPR_LZO:
 | 
				
			||||||
        #return lzo.decompress(''.join(('\xf0', struct.pack('>I', unc_len), data)))
 | 
					    # return lzo.decompress(''.join(('\xf0', struct.pack('>I', unc_len), data)))
 | 
				
			||||||
    if ctype == UBIFS_COMPR_ZLIB:
 | 
					    if ctype == UBIFS_COMPR_ZLIB:
 | 
				
			||||||
        return zlib.decompress(data, -11)
 | 
					        return zlib.decompress(data, -11)
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,7 +7,8 @@ from ubifs.misc import parse_key
 | 
				
			|||||||
class common_hdr(object):
 | 
					class common_hdr(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(UBIFS_COMMON_HDR_FIELDS, struct.unpack(UBIFS_COMMON_HDR_FORMAT, buf)))
 | 
					        fields = dict(list(zip(UBIFS_COMMON_HDR_FIELDS,
 | 
				
			||||||
 | 
					                      struct.unpack(UBIFS_COMMON_HDR_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            setattr(self, key, fields[key])
 | 
					            setattr(self, key, fields[key])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -25,7 +26,8 @@ class common_hdr(object):
 | 
				
			|||||||
class sb_node(object):
 | 
					class sb_node(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(UBIFS_SB_NODE_FIELDS, struct.unpack(UBIFS_SB_NODE_FORMAT, buf)))
 | 
					        fields = dict(
 | 
				
			||||||
 | 
					            list(zip(UBIFS_SB_NODE_FIELDS, struct.unpack(UBIFS_SB_NODE_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            setattr(self, key, fields[key])
 | 
					            setattr(self, key, fields[key])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -41,7 +43,8 @@ class sb_node(object):
 | 
				
			|||||||
class mst_node(object):
 | 
					class mst_node(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(UBIFS_MST_NODE_FIELDS, struct.unpack(UBIFS_MST_NODE_FORMAT, buf)))
 | 
					        fields = dict(
 | 
				
			||||||
 | 
					            list(zip(UBIFS_MST_NODE_FIELDS, struct.unpack(UBIFS_MST_NODE_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            setattr(self, key, fields[key])
 | 
					            setattr(self, key, fields[key])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -57,7 +60,8 @@ class mst_node(object):
 | 
				
			|||||||
class dent_node(object):
 | 
					class dent_node(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(UBIFS_DENT_NODE_FIELDS, struct.unpack(UBIFS_DENT_NODE_FORMAT, buf)))
 | 
					        fields = dict(
 | 
				
			||||||
 | 
					            list(zip(UBIFS_DENT_NODE_FIELDS, struct.unpack(UBIFS_DENT_NODE_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            if key == 'key':
 | 
					            if key == 'key':
 | 
				
			||||||
                setattr(self, key, parse_key(fields[key]))
 | 
					                setattr(self, key, parse_key(fields[key]))
 | 
				
			||||||
@@ -78,7 +82,8 @@ class dent_node(object):
 | 
				
			|||||||
class data_node(object):
 | 
					class data_node(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(UBIFS_DATA_NODE_FIELDS, struct.unpack(UBIFS_DATA_NODE_FORMAT, buf)))
 | 
					        fields = dict(
 | 
				
			||||||
 | 
					            list(zip(UBIFS_DATA_NODE_FIELDS, struct.unpack(UBIFS_DATA_NODE_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            if key == 'key':
 | 
					            if key == 'key':
 | 
				
			||||||
                setattr(self, key, parse_key(fields[key]))
 | 
					                setattr(self, key, parse_key(fields[key]))
 | 
				
			||||||
@@ -100,7 +105,8 @@ class data_node(object):
 | 
				
			|||||||
class idx_node(object):
 | 
					class idx_node(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(UBIFS_IDX_NODE_FIELDS, struct.unpack(UBIFS_IDX_NODE_FORMAT, buf)))
 | 
					        fields = dict(
 | 
				
			||||||
 | 
					            list(zip(UBIFS_IDX_NODE_FIELDS, struct.unpack(UBIFS_IDX_NODE_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            setattr(self, key, fields[key])
 | 
					            setattr(self, key, fields[key])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -118,7 +124,8 @@ class idx_node(object):
 | 
				
			|||||||
class ino_node(object):
 | 
					class ino_node(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(UBIFS_INO_NODE_FIELDS, struct.unpack(UBIFS_INO_NODE_FORMAT, buf)))
 | 
					        fields = dict(
 | 
				
			||||||
 | 
					            list(zip(UBIFS_INO_NODE_FIELDS, struct.unpack(UBIFS_INO_NODE_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            if key == 'key':
 | 
					            if key == 'key':
 | 
				
			||||||
                setattr(self, key, parse_key(fields[key]))
 | 
					                setattr(self, key, parse_key(fields[key]))
 | 
				
			||||||
@@ -139,7 +146,8 @@ class ino_node(object):
 | 
				
			|||||||
class branch(object):
 | 
					class branch(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(UBIFS_BRANCH_FIELDS, struct.unpack(UBIFS_BRANCH_FORMAT, buf)))
 | 
					        fields = dict(
 | 
				
			||||||
 | 
					            list(zip(UBIFS_BRANCH_FIELDS, struct.unpack(UBIFS_BRANCH_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            setattr(self, key, fields[key])
 | 
					            setattr(self, key, fields[key])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -42,7 +42,8 @@ def dents(ubifs, inodes, dent_node, path='', perms=False):
 | 
				
			|||||||
        try:
 | 
					        try:
 | 
				
			||||||
            os.symlink('%s' % inode['ino'].data, dent_path)
 | 
					            os.symlink('%s' % inode['ino'].data, dent_path)
 | 
				
			||||||
        except Exception as e:
 | 
					        except Exception as e:
 | 
				
			||||||
            ubifs.log.write('SYMLINK Fail: %s : %s' % (inode['ino'].data, dent_path))
 | 
					            ubifs.log.write('SYMLINK Fail: %s : %s' %
 | 
				
			||||||
 | 
					                            (inode['ino'].data, dent_path))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    elif dent_node.type in [UBIFS_ITYPE_BLK, UBIFS_ITYPE_CHR]:
 | 
					    elif dent_node.type in [UBIFS_ITYPE_BLK, UBIFS_ITYPE_CHR]:
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,7 +17,8 @@ def index(ubifs, lnum, offset, inodes={}):
 | 
				
			|||||||
            inodes[ino_num] = {}
 | 
					            inodes[ino_num] = {}
 | 
				
			||||||
        inodes[ino_num]['ino'] = inon
 | 
					        inodes[ino_num]['ino'] = inon
 | 
				
			||||||
    elif chdr.node_type == UBIFS_DATA_NODE:
 | 
					    elif chdr.node_type == UBIFS_DATA_NODE:
 | 
				
			||||||
        datn = extract.data_node(ubifs, lnum, offset + UBIFS_COMMON_HDR_SZ, chdr.len)
 | 
					        datn = extract.data_node(
 | 
				
			||||||
 | 
					            ubifs, lnum, offset + UBIFS_COMMON_HDR_SZ, chdr.len)
 | 
				
			||||||
        ino_num = datn.key['ino_num']
 | 
					        ino_num = datn.key['ino_num']
 | 
				
			||||||
        if ino_num not in inodes:
 | 
					        if ino_num not in inodes:
 | 
				
			||||||
            inodes[ino_num] = {}
 | 
					            inodes[ino_num] = {}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,13 +4,15 @@ from ubi_io import leb_virtual_file
 | 
				
			|||||||
from ubifs import ubifs, walk, output
 | 
					from ubifs import ubifs, walk, output
 | 
				
			||||||
from ubifs.defines import PRINT_UBIFS_KEY_HASH, PRINT_UBIFS_COMPR
 | 
					from ubifs.defines import PRINT_UBIFS_KEY_HASH, PRINT_UBIFS_COMPR
 | 
				
			||||||
from ubi.defines import PRINT_VOL_TYPE_LIST, UBI_VTBL_AUTORESIZE_FLG
 | 
					from ubi.defines import PRINT_VOL_TYPE_LIST, UBI_VTBL_AUTORESIZE_FLG
 | 
				
			||||||
output_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'output')
 | 
					output_dir = os.path.join(os.path.dirname(
 | 
				
			||||||
 | 
					    os.path.dirname(os.path.realpath(__file__))), 'output')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def extract_files(ubifs, out_path, perms=False):
 | 
					def extract_files(ubifs, out_path, perms=False):
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        inodes = {}
 | 
					        inodes = {}
 | 
				
			||||||
        walk.index(ubifs, ubifs.master_node.root_lnum, ubifs.master_node.root_offs, inodes)
 | 
					        walk.index(ubifs, ubifs.master_node.root_lnum,
 | 
				
			||||||
 | 
					                   ubifs.master_node.root_offs, inodes)
 | 
				
			||||||
        for dent in inodes[1]['dent']:
 | 
					        for dent in inodes[1]['dent']:
 | 
				
			||||||
            output.dents(ubifs, inodes, dent, out_path, perms)
 | 
					            output.dents(ubifs, inodes, dent, out_path, perms)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -56,7 +58,8 @@ def get_ubi_params(ubi):
 | 
				
			|||||||
            else:
 | 
					            else:
 | 
				
			||||||
                ini_params[img_seq][volume]['vol_flags'] = image.volumes[volume].vol_rec.flags
 | 
					                ini_params[img_seq][volume]['vol_flags'] = image.volumes[volume].vol_rec.flags
 | 
				
			||||||
            ini_params[img_seq][volume]['vol_id'] = image.volumes[volume].vol_id
 | 
					            ini_params[img_seq][volume]['vol_id'] = image.volumes[volume].vol_id
 | 
				
			||||||
            ini_params[img_seq][volume]['vol_name'] = image.volumes[volume].name.rstrip('\x00')
 | 
					            ini_params[img_seq][volume]['vol_name'] = image.volumes[volume].name.rstrip(
 | 
				
			||||||
 | 
					                '\x00')
 | 
				
			||||||
            ini_params[img_seq][volume]['vol_alignment'] = image.volumes[volume].vol_rec.alignment
 | 
					            ini_params[img_seq][volume]['vol_alignment'] = image.volumes[volume].vol_rec.alignment
 | 
				
			||||||
            ini_params[img_seq][volume]['vol_size'] = image.volumes[volume].vol_rec.reserved_pebs * ubi.leb_size
 | 
					            ini_params[img_seq][volume]['vol_size'] = image.volumes[volume].vol_rec.reserved_pebs * ubi.leb_size
 | 
				
			||||||
            ufsfile = leb_virtual_file(ubi, image.volumes[volume])
 | 
					            ufsfile = leb_virtual_file(ubi, image.volumes[volume])
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -162,7 +162,8 @@ class HelpFormatter(object):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            invocation_length = max([len(s) for s in invocations])
 | 
					            invocation_length = max([len(s) for s in invocations])
 | 
				
			||||||
            action_length = invocation_length + self._current_indent
 | 
					            action_length = invocation_length + self._current_indent
 | 
				
			||||||
            self._action_max_length = max(self._action_max_length, action_length)
 | 
					            self._action_max_length = max(
 | 
				
			||||||
 | 
					                self._action_max_length, action_length)
 | 
				
			||||||
            self._add_item(self._format_action, [action])
 | 
					            self._add_item(self._format_action, [action])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def add_arguments(self, actions):
 | 
					    def add_arguments(self, actions):
 | 
				
			||||||
@@ -325,7 +326,8 @@ class HelpFormatter(object):
 | 
				
			|||||||
        return self._fill_text(text, text_width, indent) + '\n\n'
 | 
					        return self._fill_text(text, text_width, indent) + '\n\n'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _format_action(self, action):
 | 
					    def _format_action(self, action):
 | 
				
			||||||
        help_position = min(self._action_max_length + 2, self._max_help_position)
 | 
					        help_position = min(self._action_max_length +
 | 
				
			||||||
 | 
					                            2, self._max_help_position)
 | 
				
			||||||
        help_width = self._width - help_position
 | 
					        help_width = self._width - help_position
 | 
				
			||||||
        action_width = help_position - self._current_indent - 2
 | 
					        action_width = help_position - self._current_indent - 2
 | 
				
			||||||
        action_header = self._format_action_invocation(action)
 | 
					        action_header = self._format_action_invocation(action)
 | 
				
			||||||
@@ -539,10 +541,12 @@ class _StoreAction(Action):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def __init__(self, option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None):
 | 
					    def __init__(self, option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None):
 | 
				
			||||||
        if nargs == 0:
 | 
					        if nargs == 0:
 | 
				
			||||||
            raise ValueError('nargs for store actions must be > 0; if you have nothing to store, actions such as store true or store const may be more appropriate')
 | 
					            raise ValueError(
 | 
				
			||||||
 | 
					                'nargs for store actions must be > 0; if you have nothing to store, actions such as store true or store const may be more appropriate')
 | 
				
			||||||
        if const is not None and nargs != OPTIONAL:
 | 
					        if const is not None and nargs != OPTIONAL:
 | 
				
			||||||
            raise ValueError('nargs must be %r to supply const' % OPTIONAL)
 | 
					            raise ValueError('nargs must be %r to supply const' % OPTIONAL)
 | 
				
			||||||
        super(_StoreAction, self).__init__(option_strings=option_strings, dest=dest, nargs=nargs, const=const, default=default, type=type, choices=choices, required=required, help=help, metavar=metavar)
 | 
					        super(_StoreAction, self).__init__(option_strings=option_strings, dest=dest, nargs=nargs, const=const,
 | 
				
			||||||
 | 
					                                           default=default, type=type, choices=choices, required=required, help=help, metavar=metavar)
 | 
				
			||||||
        return
 | 
					        return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __call__(self, parser, namespace, values, option_string=None):
 | 
					    def __call__(self, parser, namespace, values, option_string=None):
 | 
				
			||||||
@@ -552,7 +556,8 @@ class _StoreAction(Action):
 | 
				
			|||||||
class _StoreConstAction(Action):
 | 
					class _StoreConstAction(Action):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, option_strings, dest, const, default=None, required=False, help=None, metavar=None):
 | 
					    def __init__(self, option_strings, dest, const, default=None, required=False, help=None, metavar=None):
 | 
				
			||||||
        super(_StoreConstAction, self).__init__(option_strings=option_strings, dest=dest, nargs=0, const=const, default=default, required=required, help=help)
 | 
					        super(_StoreConstAction, self).__init__(option_strings=option_strings,
 | 
				
			||||||
 | 
					                                                dest=dest, nargs=0, const=const, default=default, required=required, help=help)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __call__(self, parser, namespace, values, option_string=None):
 | 
					    def __call__(self, parser, namespace, values, option_string=None):
 | 
				
			||||||
        setattr(namespace, self.dest, self.const)
 | 
					        setattr(namespace, self.dest, self.const)
 | 
				
			||||||
@@ -561,23 +566,27 @@ class _StoreConstAction(Action):
 | 
				
			|||||||
class _StoreTrueAction(_StoreConstAction):
 | 
					class _StoreTrueAction(_StoreConstAction):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, option_strings, dest, default=False, required=False, help=None):
 | 
					    def __init__(self, option_strings, dest, default=False, required=False, help=None):
 | 
				
			||||||
        super(_StoreTrueAction, self).__init__(option_strings=option_strings, dest=dest, const=True, default=default, required=required, help=help)
 | 
					        super(_StoreTrueAction, self).__init__(option_strings=option_strings,
 | 
				
			||||||
 | 
					                                               dest=dest, const=True, default=default, required=required, help=help)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class _StoreFalseAction(_StoreConstAction):
 | 
					class _StoreFalseAction(_StoreConstAction):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, option_strings, dest, default=True, required=False, help=None):
 | 
					    def __init__(self, option_strings, dest, default=True, required=False, help=None):
 | 
				
			||||||
        super(_StoreFalseAction, self).__init__(option_strings=option_strings, dest=dest, const=False, default=default, required=required, help=help)
 | 
					        super(_StoreFalseAction, self).__init__(option_strings=option_strings,
 | 
				
			||||||
 | 
					                                                dest=dest, const=False, default=default, required=required, help=help)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class _AppendAction(Action):
 | 
					class _AppendAction(Action):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None):
 | 
					    def __init__(self, option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None):
 | 
				
			||||||
        if nargs == 0:
 | 
					        if nargs == 0:
 | 
				
			||||||
            raise ValueError('nargs for append actions must be > 0; if arg strings are not supplying the value to append, the append const action may be more appropriate')
 | 
					            raise ValueError(
 | 
				
			||||||
 | 
					                'nargs for append actions must be > 0; if arg strings are not supplying the value to append, the append const action may be more appropriate')
 | 
				
			||||||
        if const is not None and nargs != OPTIONAL:
 | 
					        if const is not None and nargs != OPTIONAL:
 | 
				
			||||||
            raise ValueError('nargs must be %r to supply const' % OPTIONAL)
 | 
					            raise ValueError('nargs must be %r to supply const' % OPTIONAL)
 | 
				
			||||||
        super(_AppendAction, self).__init__(option_strings=option_strings, dest=dest, nargs=nargs, const=const, default=default, type=type, choices=choices, required=required, help=help, metavar=metavar)
 | 
					        super(_AppendAction, self).__init__(option_strings=option_strings, dest=dest, nargs=nargs, const=const,
 | 
				
			||||||
 | 
					                                            default=default, type=type, choices=choices, required=required, help=help, metavar=metavar)
 | 
				
			||||||
        return
 | 
					        return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __call__(self, parser, namespace, values, option_string=None):
 | 
					    def __call__(self, parser, namespace, values, option_string=None):
 | 
				
			||||||
@@ -589,7 +598,8 @@ class _AppendAction(Action):
 | 
				
			|||||||
class _AppendConstAction(Action):
 | 
					class _AppendConstAction(Action):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, option_strings, dest, const, default=None, required=False, help=None, metavar=None):
 | 
					    def __init__(self, option_strings, dest, const, default=None, required=False, help=None, metavar=None):
 | 
				
			||||||
        super(_AppendConstAction, self).__init__(option_strings=option_strings, dest=dest, nargs=0, const=const, default=default, required=required, help=help, metavar=metavar)
 | 
					        super(_AppendConstAction, self).__init__(option_strings=option_strings, dest=dest,
 | 
				
			||||||
 | 
					                                                 nargs=0, const=const, default=default, required=required, help=help, metavar=metavar)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __call__(self, parser, namespace, values, option_string=None):
 | 
					    def __call__(self, parser, namespace, values, option_string=None):
 | 
				
			||||||
        items = _copy.copy(_ensure_value(namespace, self.dest, []))
 | 
					        items = _copy.copy(_ensure_value(namespace, self.dest, []))
 | 
				
			||||||
@@ -600,7 +610,8 @@ class _AppendConstAction(Action):
 | 
				
			|||||||
class _CountAction(Action):
 | 
					class _CountAction(Action):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, option_strings, dest, default=None, required=False, help=None):
 | 
					    def __init__(self, option_strings, dest, default=None, required=False, help=None):
 | 
				
			||||||
        super(_CountAction, self).__init__(option_strings=option_strings, dest=dest, nargs=0, default=default, required=required, help=help)
 | 
					        super(_CountAction, self).__init__(option_strings=option_strings,
 | 
				
			||||||
 | 
					                                           dest=dest, nargs=0, default=default, required=required, help=help)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __call__(self, parser, namespace, values, option_string=None):
 | 
					    def __call__(self, parser, namespace, values, option_string=None):
 | 
				
			||||||
        new_count = _ensure_value(namespace, self.dest, 0) + 1
 | 
					        new_count = _ensure_value(namespace, self.dest, 0) + 1
 | 
				
			||||||
@@ -610,7 +621,8 @@ class _CountAction(Action):
 | 
				
			|||||||
class _HelpAction(Action):
 | 
					class _HelpAction(Action):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, option_strings, dest=SUPPRESS, default=SUPPRESS, help=None):
 | 
					    def __init__(self, option_strings, dest=SUPPRESS, default=SUPPRESS, help=None):
 | 
				
			||||||
        super(_HelpAction, self).__init__(option_strings=option_strings, dest=dest, default=default, nargs=0, help=help)
 | 
					        super(_HelpAction, self).__init__(option_strings=option_strings,
 | 
				
			||||||
 | 
					                                          dest=dest, default=default, nargs=0, help=help)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __call__(self, parser, namespace, values, option_string=None):
 | 
					    def __call__(self, parser, namespace, values, option_string=None):
 | 
				
			||||||
        parser.print_help()
 | 
					        parser.print_help()
 | 
				
			||||||
@@ -620,7 +632,8 @@ class _HelpAction(Action):
 | 
				
			|||||||
class _VersionAction(Action):
 | 
					class _VersionAction(Action):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, option_strings, version=None, dest=SUPPRESS, default=SUPPRESS, help="show program's version number and exit"):
 | 
					    def __init__(self, option_strings, version=None, dest=SUPPRESS, default=SUPPRESS, help="show program's version number and exit"):
 | 
				
			||||||
        super(_VersionAction, self).__init__(option_strings=option_strings, dest=dest, default=default, nargs=0, help=help)
 | 
					        super(_VersionAction, self).__init__(option_strings=option_strings,
 | 
				
			||||||
 | 
					                                             dest=dest, default=default, nargs=0, help=help)
 | 
				
			||||||
        self.version = version
 | 
					        self.version = version
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __call__(self, parser, namespace, values, option_string=None):
 | 
					    def __call__(self, parser, namespace, values, option_string=None):
 | 
				
			||||||
@@ -646,7 +659,8 @@ class _SubParsersAction(Action):
 | 
				
			|||||||
        self._parser_class = parser_class
 | 
					        self._parser_class = parser_class
 | 
				
			||||||
        self._name_parser_map = _collections.OrderedDict()
 | 
					        self._name_parser_map = _collections.OrderedDict()
 | 
				
			||||||
        self._choices_actions = []
 | 
					        self._choices_actions = []
 | 
				
			||||||
        super(_SubParsersAction, self).__init__(option_strings=option_strings, dest=dest, nargs=PARSER, choices=self._name_parser_map, help=help, metavar=metavar)
 | 
					        super(_SubParsersAction, self).__init__(option_strings=option_strings, dest=dest,
 | 
				
			||||||
 | 
					                                                nargs=PARSER, choices=self._name_parser_map, help=help, metavar=metavar)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def add_parser(self, name, **kwargs):
 | 
					    def add_parser(self, name, **kwargs):
 | 
				
			||||||
        if kwargs.get('prog') is None:
 | 
					        if kwargs.get('prog') is None:
 | 
				
			||||||
@@ -674,7 +688,8 @@ class _SubParsersAction(Action):
 | 
				
			|||||||
            msg = _('unknown parser %r (choices: %s)') % tup
 | 
					            msg = _('unknown parser %r (choices: %s)') % tup
 | 
				
			||||||
            raise ArgumentError(self, msg)
 | 
					            raise ArgumentError(self, msg)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        namespace, arg_strings = parser.parse_known_args(arg_strings, namespace)
 | 
					        namespace, arg_strings = parser.parse_known_args(
 | 
				
			||||||
 | 
					            arg_strings, namespace)
 | 
				
			||||||
        if arg_strings:
 | 
					        if arg_strings:
 | 
				
			||||||
            vars(namespace).setdefault(_UNRECOGNIZED_ARGS_ATTR, [])
 | 
					            vars(namespace).setdefault(_UNRECOGNIZED_ARGS_ATTR, [])
 | 
				
			||||||
            getattr(namespace, _UNRECOGNIZED_ARGS_ATTR).extend(arg_strings)
 | 
					            getattr(namespace, _UNRECOGNIZED_ARGS_ATTR).extend(arg_strings)
 | 
				
			||||||
@@ -799,7 +814,8 @@ class _ActionsContainer(object):
 | 
				
			|||||||
            try:
 | 
					            try:
 | 
				
			||||||
                self._get_formatter()._format_args(action, None)
 | 
					                self._get_formatter()._format_args(action, None)
 | 
				
			||||||
            except TypeError:
 | 
					            except TypeError:
 | 
				
			||||||
                raise ValueError('length of metavar tuple does not match nargs')
 | 
					                raise ValueError(
 | 
				
			||||||
 | 
					                    'length of metavar tuple does not match nargs')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return self._add_action(action)
 | 
					        return self._add_action(action)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -841,12 +857,14 @@ class _ActionsContainer(object):
 | 
				
			|||||||
        group_map = {}
 | 
					        group_map = {}
 | 
				
			||||||
        for group in container._action_groups:
 | 
					        for group in container._action_groups:
 | 
				
			||||||
            if group.title not in title_group_map:
 | 
					            if group.title not in title_group_map:
 | 
				
			||||||
                title_group_map[group.title] = self.add_argument_group(title=group.title, description=group.description, conflict_handler=group.conflict_handler)
 | 
					                title_group_map[group.title] = self.add_argument_group(
 | 
				
			||||||
 | 
					                    title=group.title, description=group.description, conflict_handler=group.conflict_handler)
 | 
				
			||||||
            for action in group._group_actions:
 | 
					            for action in group._group_actions:
 | 
				
			||||||
                group_map[action] = title_group_map[group.title]
 | 
					                group_map[action] = title_group_map[group.title]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        for group in container._mutually_exclusive_groups:
 | 
					        for group in container._mutually_exclusive_groups:
 | 
				
			||||||
            mutex_group = self.add_mutually_exclusive_group(required=group.required)
 | 
					            mutex_group = self.add_mutually_exclusive_group(
 | 
				
			||||||
 | 
					                required=group.required)
 | 
				
			||||||
            for action in group._group_actions:
 | 
					            for action in group._group_actions:
 | 
				
			||||||
                group_map[action] = mutex_group
 | 
					                group_map[action] = mutex_group
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -915,7 +933,8 @@ class _ActionsContainer(object):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def _handle_conflict_error(self, action, conflicting_actions):
 | 
					    def _handle_conflict_error(self, action, conflicting_actions):
 | 
				
			||||||
        message = _('conflicting option string(s): %s')
 | 
					        message = _('conflicting option string(s): %s')
 | 
				
			||||||
        conflict_string = ', '.join([option_string for option_string, action in conflicting_actions])
 | 
					        conflict_string = ', '.join(
 | 
				
			||||||
 | 
					            [option_string for option_string, action in conflicting_actions])
 | 
				
			||||||
        raise ArgumentError(action, message % conflict_string)
 | 
					        raise ArgumentError(action, message % conflict_string)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _handle_conflict_resolve(self, action, conflicting_actions):
 | 
					    def _handle_conflict_resolve(self, action, conflicting_actions):
 | 
				
			||||||
@@ -981,9 +1000,11 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
    def __init__(self, prog=None, usage=None, description=None, epilog=None, version=None, parents=[], formatter_class=HelpFormatter, prefix_chars='-', fromfile_prefix_chars=None, argument_default=None, conflict_handler='error', add_help=True):
 | 
					    def __init__(self, prog=None, usage=None, description=None, epilog=None, version=None, parents=[], formatter_class=HelpFormatter, prefix_chars='-', fromfile_prefix_chars=None, argument_default=None, conflict_handler='error', add_help=True):
 | 
				
			||||||
        if version is not None:
 | 
					        if version is not None:
 | 
				
			||||||
            import warnings
 | 
					            import warnings
 | 
				
			||||||
            warnings.warn('The "version" argument to ArgumentParser is deprecated. Please use "add_argument(..., action=\'version\', version="N", ...)" instead', DeprecationWarning)
 | 
					            warnings.warn(
 | 
				
			||||||
 | 
					                'The "version" argument to ArgumentParser is deprecated. Please use "add_argument(..., action=\'version\', version="N", ...)" instead', DeprecationWarning)
 | 
				
			||||||
        superinit = super(ArgumentParser, self).__init__
 | 
					        superinit = super(ArgumentParser, self).__init__
 | 
				
			||||||
        superinit(description=description, prefix_chars=prefix_chars, argument_default=argument_default, conflict_handler=conflict_handler)
 | 
					        superinit(description=description, prefix_chars=prefix_chars,
 | 
				
			||||||
 | 
					                  argument_default=argument_default, conflict_handler=conflict_handler)
 | 
				
			||||||
        if prog is None:
 | 
					        if prog is None:
 | 
				
			||||||
            prog = _os.path.basename(_sys.argv[0])
 | 
					            prog = _os.path.basename(_sys.argv[0])
 | 
				
			||||||
        self.prog = prog
 | 
					        self.prog = prog
 | 
				
			||||||
@@ -1004,9 +1025,11 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
        self.register('type', None, identity)
 | 
					        self.register('type', None, identity)
 | 
				
			||||||
        default_prefix = '-' if '-' in prefix_chars else prefix_chars[0]
 | 
					        default_prefix = '-' if '-' in prefix_chars else prefix_chars[0]
 | 
				
			||||||
        if self.add_help:
 | 
					        if self.add_help:
 | 
				
			||||||
            self.add_argument(default_prefix + 'h', default_prefix * 2 + 'help', action='help', default=SUPPRESS, help=_('show this help message and exit'))
 | 
					            self.add_argument(default_prefix + 'h', default_prefix * 2 + 'help',
 | 
				
			||||||
 | 
					                              action='help', default=SUPPRESS, help=_('show this help message and exit'))
 | 
				
			||||||
        if self.version:
 | 
					        if self.version:
 | 
				
			||||||
            self.add_argument(default_prefix + 'v', default_prefix * 2 + 'version', action='version', default=SUPPRESS, version=self.version, help=_("show program's version number and exit"))
 | 
					            self.add_argument(default_prefix + 'v', default_prefix * 2 + 'version', action='version',
 | 
				
			||||||
 | 
					                              default=SUPPRESS, version=self.version, help=_("show program's version number and exit"))
 | 
				
			||||||
        for parent in parents:
 | 
					        for parent in parents:
 | 
				
			||||||
            self._add_container_actions(parent)
 | 
					            self._add_container_actions(parent)
 | 
				
			||||||
            try:
 | 
					            try:
 | 
				
			||||||
@@ -1079,7 +1102,7 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
                if not hasattr(namespace, action.dest):
 | 
					                if not hasattr(namespace, action.dest):
 | 
				
			||||||
                    if action.default is not SUPPRESS:
 | 
					                    if action.default is not SUPPRESS:
 | 
				
			||||||
                        default = action.default
 | 
					                        default = action.default
 | 
				
			||||||
                        if isinstance(action.default, basestring):
 | 
					                        if isinstance(action.default, str):
 | 
				
			||||||
                            default = self._get_value(action, default)
 | 
					                            default = self._get_value(action, default)
 | 
				
			||||||
                        setattr(namespace, action.dest, default)
 | 
					                        setattr(namespace, action.dest, default)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1213,7 +1236,8 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
        else:
 | 
					        else:
 | 
				
			||||||
            max_option_string_index = -1
 | 
					            max_option_string_index = -1
 | 
				
			||||||
        while start_index <= max_option_string_index:
 | 
					        while start_index <= max_option_string_index:
 | 
				
			||||||
            next_option_string_index = min([index for index in option_string_indices if index >= start_index])
 | 
					            next_option_string_index = min(
 | 
				
			||||||
 | 
					                [index for index in option_string_indices if index >= start_index])
 | 
				
			||||||
            if start_index != next_option_string_index:
 | 
					            if start_index != next_option_string_index:
 | 
				
			||||||
                positionals_end_index = consume_positionals(start_index)
 | 
					                positionals_end_index = consume_positionals(start_index)
 | 
				
			||||||
                if positionals_end_index > start_index:
 | 
					                if positionals_end_index > start_index:
 | 
				
			||||||
@@ -1243,7 +1267,8 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
                    if action in seen_non_default_actions:
 | 
					                    if action in seen_non_default_actions:
 | 
				
			||||||
                        break
 | 
					                        break
 | 
				
			||||||
                else:
 | 
					                else:
 | 
				
			||||||
                    names = [_get_action_name(action) for action in group._group_actions if action.help is not SUPPRESS]
 | 
					                    names = [_get_action_name(
 | 
				
			||||||
 | 
					                        action) for action in group._group_actions if action.help is not SUPPRESS]
 | 
				
			||||||
                    msg = _('one of the arguments %s is required')
 | 
					                    msg = _('one of the arguments %s is required')
 | 
				
			||||||
                    self.error(msg % ' '.join(names))
 | 
					                    self.error(msg % ' '.join(names))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -1293,7 +1318,8 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
        result = []
 | 
					        result = []
 | 
				
			||||||
        for i in range(len(actions), 0, -1):
 | 
					        for i in range(len(actions), 0, -1):
 | 
				
			||||||
            actions_slice = actions[:i]
 | 
					            actions_slice = actions[:i]
 | 
				
			||||||
            pattern = ''.join([self._get_nargs_pattern(action) for action in actions_slice])
 | 
					            pattern = ''.join([self._get_nargs_pattern(action)
 | 
				
			||||||
 | 
					                              for action in actions_slice])
 | 
				
			||||||
            match = _re.match(pattern, arg_strings_pattern)
 | 
					            match = _re.match(pattern, arg_strings_pattern)
 | 
				
			||||||
            if match is not None:
 | 
					            if match is not None:
 | 
				
			||||||
                result.extend([len(string) for string in match.groups()])
 | 
					                result.extend([len(string) for string in match.groups()])
 | 
				
			||||||
@@ -1319,7 +1345,8 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
                    return (action, option_string, explicit_arg)
 | 
					                    return (action, option_string, explicit_arg)
 | 
				
			||||||
            option_tuples = self._get_option_tuples(arg_string)
 | 
					            option_tuples = self._get_option_tuples(arg_string)
 | 
				
			||||||
            if len(option_tuples) > 1:
 | 
					            if len(option_tuples) > 1:
 | 
				
			||||||
                options = ', '.join([option_string for action, option_string, explicit_arg in option_tuples])
 | 
					                options = ', '.join(
 | 
				
			||||||
 | 
					                    [option_string for action, option_string, explicit_arg in option_tuples])
 | 
				
			||||||
                tup = (arg_string, options)
 | 
					                tup = (arg_string, options)
 | 
				
			||||||
                self.error(_('ambiguous option: %s could match %s') % tup)
 | 
					                self.error(_('ambiguous option: %s could match %s') % tup)
 | 
				
			||||||
            elif len(option_tuples) == 1:
 | 
					            elif len(option_tuples) == 1:
 | 
				
			||||||
@@ -1396,7 +1423,7 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
                value = action.const
 | 
					                value = action.const
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                value = action.default
 | 
					                value = action.default
 | 
				
			||||||
            if isinstance(value, basestring):
 | 
					            if isinstance(value, str):
 | 
				
			||||||
                value = self._get_value(action, value)
 | 
					                value = self._get_value(action, value)
 | 
				
			||||||
                self._check_value(action, value)
 | 
					                self._check_value(action, value)
 | 
				
			||||||
        elif not arg_strings and action.nargs == ZERO_OR_MORE and not action.option_strings:
 | 
					        elif not arg_strings and action.nargs == ZERO_OR_MORE and not action.option_strings:
 | 
				
			||||||
@@ -1448,12 +1475,14 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def format_usage(self):
 | 
					    def format_usage(self):
 | 
				
			||||||
        formatter = self._get_formatter()
 | 
					        formatter = self._get_formatter()
 | 
				
			||||||
        formatter.add_usage(self.usage, self._actions, self._mutually_exclusive_groups)
 | 
					        formatter.add_usage(self.usage, self._actions,
 | 
				
			||||||
 | 
					                            self._mutually_exclusive_groups)
 | 
				
			||||||
        return formatter.format_help()
 | 
					        return formatter.format_help()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def format_help(self):
 | 
					    def format_help(self):
 | 
				
			||||||
        formatter = self._get_formatter()
 | 
					        formatter = self._get_formatter()
 | 
				
			||||||
        formatter.add_usage(self.usage, self._actions, self._mutually_exclusive_groups)
 | 
					        formatter.add_usage(self.usage, self._actions,
 | 
				
			||||||
 | 
					                            self._mutually_exclusive_groups)
 | 
				
			||||||
        formatter.add_text(self.description)
 | 
					        formatter.add_text(self.description)
 | 
				
			||||||
        for action_group in self._action_groups:
 | 
					        for action_group in self._action_groups:
 | 
				
			||||||
            formatter.start_section(action_group.title)
 | 
					            formatter.start_section(action_group.title)
 | 
				
			||||||
@@ -1466,7 +1495,8 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def format_version(self):
 | 
					    def format_version(self):
 | 
				
			||||||
        import warnings
 | 
					        import warnings
 | 
				
			||||||
        warnings.warn('The format_version method is deprecated -- the "version" argument to ArgumentParser is no longer supported.', DeprecationWarning)
 | 
					        warnings.warn(
 | 
				
			||||||
 | 
					            'The format_version method is deprecated -- the "version" argument to ArgumentParser is no longer supported.', DeprecationWarning)
 | 
				
			||||||
        formatter = self._get_formatter()
 | 
					        formatter = self._get_formatter()
 | 
				
			||||||
        formatter.add_text(self.version)
 | 
					        formatter.add_text(self.version)
 | 
				
			||||||
        return formatter.format_help()
 | 
					        return formatter.format_help()
 | 
				
			||||||
@@ -1488,7 +1518,8 @@ class ArgumentParser(_AttributeHolder, _ActionsContainer):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def print_version(self, file=None):
 | 
					    def print_version(self, file=None):
 | 
				
			||||||
        import warnings
 | 
					        import warnings
 | 
				
			||||||
        warnings.warn('The print_version method is deprecated -- the "version" argument to ArgumentParser is no longer supported.', DeprecationWarning)
 | 
					        warnings.warn(
 | 
				
			||||||
 | 
					            'The print_version method is deprecated -- the "version" argument to ArgumentParser is no longer supported.', DeprecationWarning)
 | 
				
			||||||
        self._print_message(self.format_version(), file)
 | 
					        self._print_message(self.format_version(), file)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _print_message(self, message, file=None):
 | 
					    def _print_message(self, message, file=None):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,16 +17,18 @@ class ubi:
 | 
				
			|||||||
        self._block_count = len(self.blocks)
 | 
					        self._block_count = len(self.blocks)
 | 
				
			||||||
        if self._block_count <= 0:
 | 
					        if self._block_count <= 0:
 | 
				
			||||||
            raise Exception('No blocks found.')
 | 
					            raise Exception('No blocks found.')
 | 
				
			||||||
        layout_list, data_list, int_vol_list, unknown_list = sort.by_type(self.blocks)
 | 
					        layout_list, data_list, int_vol_list, unknown_list = sort.by_type(
 | 
				
			||||||
 | 
					            self.blocks)
 | 
				
			||||||
        self._layout_blocks_list = layout_list
 | 
					        self._layout_blocks_list = layout_list
 | 
				
			||||||
        self._data_blocks_list = data_list
 | 
					        self._data_blocks_list = data_list
 | 
				
			||||||
        self._int_vol_blocks_list = int_vol_list
 | 
					        self._int_vol_blocks_list = int_vol_list
 | 
				
			||||||
        self._unknown_blocks_list = unknown_list
 | 
					        self._unknown_blocks_list = unknown_list
 | 
				
			||||||
        arbitrary_block = self.blocks.itervalues().next()
 | 
					        arbitrary_block = next(iter(self.blocks.values()))
 | 
				
			||||||
        self._min_io_size = arbitrary_block.ec_hdr.vid_hdr_offset
 | 
					        self._min_io_size = arbitrary_block.ec_hdr.vid_hdr_offset
 | 
				
			||||||
        self._leb_size = self.file.block_size - arbitrary_block.ec_hdr.data_offset
 | 
					        self._leb_size = self.file.block_size - arbitrary_block.ec_hdr.data_offset
 | 
				
			||||||
        layout_pairs = layout.group_pairs(self.blocks, self.layout_blocks_list)
 | 
					        layout_pairs = layout.group_pairs(self.blocks, self.layout_blocks_list)
 | 
				
			||||||
        layout_infos = layout.associate_blocks(self.blocks, layout_pairs, self.first_peb_num)
 | 
					        layout_infos = layout.associate_blocks(
 | 
				
			||||||
 | 
					            self.blocks, layout_pairs, self.first_peb_num)
 | 
				
			||||||
        self._images = []
 | 
					        self._images = []
 | 
				
			||||||
        for i in range(0, len(layout_infos)):
 | 
					        for i in range(0, len(layout_infos)):
 | 
				
			||||||
            self._images.append(image(self.blocks, layout_infos[i]))
 | 
					            self._images.append(image(self.blocks, layout_infos[i]))
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,10 +17,12 @@ class description(object):
 | 
				
			|||||||
        self.vtbl_recs = []
 | 
					        self.vtbl_recs = []
 | 
				
			||||||
        self.ec_hdr = extract_ec_hdr(block_buf[0:UBI_EC_HDR_SZ])
 | 
					        self.ec_hdr = extract_ec_hdr(block_buf[0:UBI_EC_HDR_SZ])
 | 
				
			||||||
        if not self.ec_hdr.errors:
 | 
					        if not self.ec_hdr.errors:
 | 
				
			||||||
            self.vid_hdr = extract_vid_hdr(block_buf[self.ec_hdr.vid_hdr_offset:self.ec_hdr.vid_hdr_offset + UBI_VID_HDR_SZ])
 | 
					            self.vid_hdr = extract_vid_hdr(
 | 
				
			||||||
 | 
					                block_buf[self.ec_hdr.vid_hdr_offset:self.ec_hdr.vid_hdr_offset + UBI_VID_HDR_SZ])
 | 
				
			||||||
            self.is_internal_vol = self.vid_hdr.vol_id >= UBI_INTERNAL_VOL_START
 | 
					            self.is_internal_vol = self.vid_hdr.vol_id >= UBI_INTERNAL_VOL_START
 | 
				
			||||||
            if self.vid_hdr.vol_id >= UBI_INTERNAL_VOL_START:
 | 
					            if self.vid_hdr.vol_id >= UBI_INTERNAL_VOL_START:
 | 
				
			||||||
                self.vtbl_recs = extract_vtbl_rec(block_buf[self.ec_hdr.data_offset:])
 | 
					                self.vtbl_recs = extract_vtbl_rec(
 | 
				
			||||||
 | 
					                    block_buf[self.ec_hdr.data_offset:])
 | 
				
			||||||
            self.leb_num = self.vid_hdr.lnum
 | 
					            self.leb_num = self.vid_hdr.lnum
 | 
				
			||||||
        self.is_vtbl = bool(self.vtbl_recs) or False
 | 
					        self.is_vtbl = bool(self.vtbl_recs) or False
 | 
				
			||||||
        self.is_valid = not self.ec_hdr.errors and not self.vid_hdr.errors
 | 
					        self.is_valid = not self.ec_hdr.errors and not self.vid_hdr.errors
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,7 +18,8 @@ def group_pairs(blocks, layout_blocks_list):
 | 
				
			|||||||
def associate_blocks(blocks, layout_pairs, start_peb_num):
 | 
					def associate_blocks(blocks, layout_pairs, start_peb_num):
 | 
				
			||||||
    seq_blocks = []
 | 
					    seq_blocks = []
 | 
				
			||||||
    for layout_pair in layout_pairs:
 | 
					    for layout_pair in layout_pairs:
 | 
				
			||||||
        seq_blocks = sort.by_image_seq(blocks, blocks[layout_pair[0]].ec_hdr.image_seq)
 | 
					        seq_blocks = sort.by_image_seq(
 | 
				
			||||||
 | 
					            blocks, blocks[layout_pair[0]].ec_hdr.image_seq)
 | 
				
			||||||
        layout_pair.append(seq_blocks)
 | 
					        layout_pair.append(seq_blocks)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return layout_pairs
 | 
					    return layout_pairs
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,7 +18,7 @@ def by_image_seq(blocks, image_seq):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def by_range(blocks, block_range):
 | 
					def by_range(blocks, block_range):
 | 
				
			||||||
    peb_range = range(block_range[0], block_range[1])
 | 
					    peb_range = list(range(block_range[0], block_range[1]))
 | 
				
			||||||
    return [i for i in blocks if i in peb_range]
 | 
					    return [i for i in blocks if i in peb_range]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -33,7 +33,7 @@ def by_leb(blocks):
 | 
				
			|||||||
        slist[blocks[block].leb_num] = block
 | 
					        slist[blocks[block].leb_num] = block
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return slist
 | 
					    return slist
 | 
				
			||||||
    return sorted(blocks.iterkeys(), key=lambda x: blocks[x].leb_num)
 | 
					    return sorted(iter(blocks.keys()), key=lambda x: blocks[x].leb_num)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def by_vol_id(blocks, slist=None):
 | 
					def by_vol_id(blocks, slist=None):
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
#!/usr/bin/python
 | 
					#!/usr/bin/python
 | 
				
			||||||
import struct
 | 
					import struct
 | 
				
			||||||
UBI_CRC32_INIT = 4294967295L
 | 
					UBI_CRC32_INIT = 4294967295
 | 
				
			||||||
UBI_MAX_VOLUMES = 128
 | 
					UBI_MAX_VOLUMES = 128
 | 
				
			||||||
UBI_INTERNAL_VOL_START = 2147479551
 | 
					UBI_INTERNAL_VOL_START = 2147479551
 | 
				
			||||||
UBI_EC_HDR_MAGIC = 'UBI#'
 | 
					UBI_EC_HDR_MAGIC = 'UBI#'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,77 +3,77 @@ from ubi.defines import PRINT_COMPAT_LIST, PRINT_VOL_TYPE_LIST, UBI_VTBL_AUTORES
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def ubi(ubi, tab=''):
 | 
					def ubi(ubi, tab=''):
 | 
				
			||||||
    print '%sUBI File' % tab
 | 
					    print(('%sUBI File' % tab))
 | 
				
			||||||
    print '%s---------------------' % tab
 | 
					    print(('%s---------------------' % tab))
 | 
				
			||||||
    print '\t%sMin I/O: %s' % (tab, ubi.min_io_size)
 | 
					    print(('\t%sMin I/O: %s' % (tab, ubi.min_io_size)))
 | 
				
			||||||
    print '\t%sLEB Size: %s' % (tab, ubi.leb_size)
 | 
					    print(('\t%sLEB Size: %s' % (tab, ubi.leb_size)))
 | 
				
			||||||
    print '\t%sPEB Size: %s' % (tab, ubi.peb_size)
 | 
					    print(('\t%sPEB Size: %s' % (tab, ubi.peb_size)))
 | 
				
			||||||
    print '\t%sTotal Block Count: %s' % (tab, ubi.block_count)
 | 
					    print(('\t%sTotal Block Count: %s' % (tab, ubi.block_count)))
 | 
				
			||||||
    print '\t%sData Block Count: %s' % (tab, len(ubi.data_blocks_list))
 | 
					    print(('\t%sData Block Count: %s' % (tab, len(ubi.data_blocks_list))))
 | 
				
			||||||
    print '\t%sLayout Block Count: %s' % (tab, len(ubi.layout_blocks_list))
 | 
					    print(('\t%sLayout Block Count: %s' % (tab, len(ubi.layout_blocks_list))))
 | 
				
			||||||
    print '\t%sInternal Volume Block Count: %s' % (tab, len(ubi.int_vol_blocks_list))
 | 
					    print(('\t%sInternal Volume Block Count: %s' % (tab, len(ubi.int_vol_blocks_list))))
 | 
				
			||||||
    print '\t%sUnknown Block Count: %s' % (tab, len(ubi.unknown_blocks_list))
 | 
					    print(('\t%sUnknown Block Count: %s' % (tab, len(ubi.unknown_blocks_list))))
 | 
				
			||||||
    print '\t%sFirst UBI PEB Number: %s' % (tab, ubi.first_peb_num)
 | 
					    print(('\t%sFirst UBI PEB Number: %s' % (tab, ubi.first_peb_num)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def image(image, tab=''):
 | 
					def image(image, tab=''):
 | 
				
			||||||
    print '%s%s' % (tab, image)
 | 
					    print(('%s%s' % (tab, image)))
 | 
				
			||||||
    print '%s---------------------' % tab
 | 
					    print(('%s---------------------' % tab))
 | 
				
			||||||
    print '\t%sImage Sequence Num: %s' % (tab, image.image_seq)
 | 
					    print(('\t%sImage Sequence Num: %s' % (tab, image.image_seq)))
 | 
				
			||||||
    for volume in image.volumes:
 | 
					    for volume in image.volumes:
 | 
				
			||||||
        print '\t%sVolume Name:%s' % (tab, volume)
 | 
					        print(('\t%sVolume Name:%s' % (tab, volume)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    print '\t%sPEB Range: %s - %s' % (tab, image.peb_range[0], image.peb_range[1])
 | 
					    print(('\t%sPEB Range: %s - %s' % (tab, image.peb_range[0], image.peb_range[1])))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def volume(volume, tab=''):
 | 
					def volume(volume, tab=''):
 | 
				
			||||||
    print '%s%s' % (tab, volume)
 | 
					    print(('%s%s' % (tab, volume)))
 | 
				
			||||||
    print '%s---------------------' % tab
 | 
					    print(('%s---------------------' % tab))
 | 
				
			||||||
    print '\t%sVol ID: %s' % (tab, volume.vol_id)
 | 
					    print(('\t%sVol ID: %s' % (tab, volume.vol_id)))
 | 
				
			||||||
    print '\t%sName: %s' % (tab, volume.name)
 | 
					    print(('\t%sName: %s' % (tab, volume.name)))
 | 
				
			||||||
    print '\t%sBlock Count: %s' % (tab, volume.block_count)
 | 
					    print(('\t%sBlock Count: %s' % (tab, volume.block_count)))
 | 
				
			||||||
    print '\n'
 | 
					    print('\n')
 | 
				
			||||||
    print '\t%sVolume Record' % tab
 | 
					    print(('\t%sVolume Record' % tab))
 | 
				
			||||||
    print '\t%s---------------------' % tab
 | 
					    print(('\t%s---------------------' % tab))
 | 
				
			||||||
    vol_rec(volume.vol_rec, '\t\t%s' % tab)
 | 
					    vol_rec(volume.vol_rec, '\t\t%s' % tab)
 | 
				
			||||||
    print '\n'
 | 
					    print('\n')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def block(block, tab='\t'):
 | 
					def block(block, tab='\t'):
 | 
				
			||||||
    print '%s%s' % (tab, block)
 | 
					    print(('%s%s' % (tab, block)))
 | 
				
			||||||
    print '%s---------------------' % tab
 | 
					    print(('%s---------------------' % tab))
 | 
				
			||||||
    print '\t%sFile Offset: %s' % (tab, block.file_offset)
 | 
					    print(('\t%sFile Offset: %s' % (tab, block.file_offset)))
 | 
				
			||||||
    print '\t%sPEB #: %s' % (tab, block.peb_num)
 | 
					    print(('\t%sPEB #: %s' % (tab, block.peb_num)))
 | 
				
			||||||
    print '\t%sLEB #: %s' % (tab, block.leb_num)
 | 
					    print(('\t%sLEB #: %s' % (tab, block.leb_num)))
 | 
				
			||||||
    print '\t%sBlock Size: %s' % (tab, block.size)
 | 
					    print(('\t%sBlock Size: %s' % (tab, block.size)))
 | 
				
			||||||
    print '\t%sInternal Volume: %s' % (tab, block.is_internal_vol)
 | 
					    print(('\t%sInternal Volume: %s' % (tab, block.is_internal_vol)))
 | 
				
			||||||
    print '\t%sIs Volume Table: %s' % (tab, block.is_vtbl)
 | 
					    print(('\t%sIs Volume Table: %s' % (tab, block.is_vtbl)))
 | 
				
			||||||
    print '\t%sIs Valid: %s' % (tab, block.is_valid)
 | 
					    print(('\t%sIs Valid: %s' % (tab, block.is_valid)))
 | 
				
			||||||
    if not block.ec_hdr.errors:
 | 
					    if not block.ec_hdr.errors:
 | 
				
			||||||
        print '\n'
 | 
					        print('\n')
 | 
				
			||||||
        print '\t%sErase Count Header' % tab
 | 
					        print(('\t%sErase Count Header' % tab))
 | 
				
			||||||
        print '\t%s---------------------' % tab
 | 
					        print(('\t%s---------------------' % tab))
 | 
				
			||||||
        ec_hdr(block.ec_hdr, '\t\t%s' % tab)
 | 
					        ec_hdr(block.ec_hdr, '\t\t%s' % tab)
 | 
				
			||||||
    if block.vid_hdr and not block.vid_hdr.errors:
 | 
					    if block.vid_hdr and not block.vid_hdr.errors:
 | 
				
			||||||
        print '\n'
 | 
					        print('\n')
 | 
				
			||||||
        print '\t%sVID Header Header' % tab
 | 
					        print(('\t%sVID Header Header' % tab))
 | 
				
			||||||
        print '\t%s---------------------' % tab
 | 
					        print(('\t%s---------------------' % tab))
 | 
				
			||||||
        vid_hdr(block.vid_hdr, '\t\t%s' % tab)
 | 
					        vid_hdr(block.vid_hdr, '\t\t%s' % tab)
 | 
				
			||||||
    if block.vtbl_recs:
 | 
					    if block.vtbl_recs:
 | 
				
			||||||
        print '\n'
 | 
					        print('\n')
 | 
				
			||||||
        print '\t%sVolume Records' % tab
 | 
					        print(('\t%sVolume Records' % tab))
 | 
				
			||||||
        print '\t%s---------------------' % tab
 | 
					        print(('\t%s---------------------' % tab))
 | 
				
			||||||
        for vol in block.vtbl_recs:
 | 
					        for vol in block.vtbl_recs:
 | 
				
			||||||
            vol_rec(vol, '\t\t%s' % tab)
 | 
					            vol_rec(vol, '\t\t%s' % tab)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    print '\n'
 | 
					    print('\n')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def ec_hdr(ec_hdr, tab=''):
 | 
					def ec_hdr(ec_hdr, tab=''):
 | 
				
			||||||
    for key, value in ec_hdr:
 | 
					    for key, value in ec_hdr:
 | 
				
			||||||
        if key == 'errors':
 | 
					        if key == 'errors':
 | 
				
			||||||
            value = ','.join(value)
 | 
					            value = ','.join(value)
 | 
				
			||||||
        print '%s%s: %r' % (tab, key, value)
 | 
					        print(('%s%s: %r' % (tab, key, value)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def vid_hdr(vid_hdr, tab=''):
 | 
					def vid_hdr(vid_hdr, tab=''):
 | 
				
			||||||
@@ -90,7 +90,7 @@ def vid_hdr(vid_hdr, tab=''):
 | 
				
			|||||||
                value = PRINT_VOL_TYPE_LIST[value]
 | 
					                value = PRINT_VOL_TYPE_LIST[value]
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                value = -1
 | 
					                value = -1
 | 
				
			||||||
        print '%s%s: %s' % (tab, key, value)
 | 
					        print(('%s%s: %s' % (tab, key, value)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def vol_rec(vol_rec, tab=''):
 | 
					def vol_rec(vol_rec, tab=''):
 | 
				
			||||||
@@ -106,4 +106,4 @@ def vol_rec(vol_rec, tab=''):
 | 
				
			|||||||
            value = 'autoresize'
 | 
					            value = 'autoresize'
 | 
				
			||||||
        elif key == 'name':
 | 
					        elif key == 'name':
 | 
				
			||||||
            value = value.strip('\x00')
 | 
					            value = value.strip('\x00')
 | 
				
			||||||
        print '%s%s: %s' % (tab, key, value)
 | 
					        print(('%s%s: %s' % (tab, key, value)))
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,7 +7,8 @@ from ubi.headers import errors
 | 
				
			|||||||
class ec_hdr(object):
 | 
					class ec_hdr(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(EC_HDR_FIELDS, struct.unpack(EC_HDR_FORMAT, buf)))
 | 
					        fields = dict(
 | 
				
			||||||
 | 
					            list(zip(EC_HDR_FIELDS, struct.unpack(EC_HDR_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            setattr(self, key, fields[key])
 | 
					            setattr(self, key, fields[key])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -25,7 +26,8 @@ class ec_hdr(object):
 | 
				
			|||||||
class vid_hdr(object):
 | 
					class vid_hdr(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(VID_HDR_FIELDS, struct.unpack(VID_HDR_FORMAT, buf)))
 | 
					        fields = dict(
 | 
				
			||||||
 | 
					            list(zip(VID_HDR_FIELDS, struct.unpack(VID_HDR_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            setattr(self, key, fields[key])
 | 
					            setattr(self, key, fields[key])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -43,7 +45,8 @@ class vid_hdr(object):
 | 
				
			|||||||
class vtbl_rec(object):
 | 
					class vtbl_rec(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(VTBL_REC_FIELDS, struct.unpack(VTBL_REC_FORMAT, buf)))
 | 
					        fields = dict(
 | 
				
			||||||
 | 
					            list(zip(VTBL_REC_FIELDS, struct.unpack(VTBL_REC_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            setattr(self, key, fields[key])
 | 
					            setattr(self, key, fields[key])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,14 +4,14 @@ from ubi.defines import *
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def ec_hdr(ec_hdr, buf):
 | 
					def ec_hdr(ec_hdr, buf):
 | 
				
			||||||
    if ec_hdr.hdr_crc != ~crc32(buf[:-4]) & 4294967295L:
 | 
					    if ec_hdr.hdr_crc != ~crc32(buf[:-4]) & 4294967295:
 | 
				
			||||||
        ec_hdr.errors.append('crc')
 | 
					        ec_hdr.errors.append('crc')
 | 
				
			||||||
    return ec_hdr
 | 
					    return ec_hdr
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def vid_hdr(vid_hdr, buf):
 | 
					def vid_hdr(vid_hdr, buf):
 | 
				
			||||||
    vid_hdr.errors = []
 | 
					    vid_hdr.errors = []
 | 
				
			||||||
    if vid_hdr.hdr_crc != ~crc32(buf[:-4]) & 4294967295L:
 | 
					    if vid_hdr.hdr_crc != ~crc32(buf[:-4]) & 4294967295:
 | 
				
			||||||
        vid_hdr.errors.append('crc')
 | 
					        vid_hdr.errors.append('crc')
 | 
				
			||||||
    return vid_hdr
 | 
					    return vid_hdr
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -22,7 +22,7 @@ def vtbl_rec(vtbl_rec, buf):
 | 
				
			|||||||
        likely_vtbl = False
 | 
					        likely_vtbl = False
 | 
				
			||||||
    elif vtbl_rec.vol_type not in (1, 2):
 | 
					    elif vtbl_rec.vol_type not in (1, 2):
 | 
				
			||||||
        likely_vtbl = False
 | 
					        likely_vtbl = False
 | 
				
			||||||
    if vtbl_rec.crc != ~crc32(buf[:-4]) & 4294967295L:
 | 
					    if vtbl_rec.crc != ~crc32(buf[:-4]) & 4294967295:
 | 
				
			||||||
        vtbl_rec.errors.append('crc')
 | 
					        vtbl_rec.errors.append('crc')
 | 
				
			||||||
    if not likely_vtbl:
 | 
					    if not likely_vtbl:
 | 
				
			||||||
        vtbl_rec.errors = ['False']
 | 
					        vtbl_rec.errors = ['False']
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,7 +18,7 @@ class description(object):
 | 
				
			|||||||
        return 'Image: %s' % self.image_seq
 | 
					        return 'Image: %s' % self.image_seq
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def get_blocks(self, blocks):
 | 
					    def get_blocks(self, blocks):
 | 
				
			||||||
        return get_blocks_in_list(blocks, range(self._start_peb, self._end_peb + 1))
 | 
					        return get_blocks_in_list(blocks, list(range(self._start_peb, self._end_peb + 1)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def _get_peb_range(self):
 | 
					    def _get_peb_range(self):
 | 
				
			||||||
        return [self._start_peb, self._end_peb]
 | 
					        return [self._start_peb, self._end_peb]
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -63,6 +63,7 @@ def get_volumes(blocks, layout_info):
 | 
				
			|||||||
        vol_name = vol_rec.name.strip('\x00')
 | 
					        vol_name = vol_rec.name.strip('\x00')
 | 
				
			||||||
        if vol_rec.rec_index not in vol_blocks_lists:
 | 
					        if vol_rec.rec_index not in vol_blocks_lists:
 | 
				
			||||||
            vol_blocks_lists[vol_rec.rec_index] = []
 | 
					            vol_blocks_lists[vol_rec.rec_index] = []
 | 
				
			||||||
        volumes[vol_name] = description(vol_rec.rec_index, vol_rec, vol_blocks_lists[vol_rec.rec_index])
 | 
					        volumes[vol_name] = description(
 | 
				
			||||||
 | 
					            vol_rec.rec_index, vol_rec, vol_blocks_lists[vol_rec.rec_index])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return volumes
 | 
					    return volumes
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,12 +16,18 @@ if __name__ == '__main__':
 | 
				
			|||||||
    try:
 | 
					    try:
 | 
				
			||||||
        parser = argparse.ArgumentParser(usage=usage, description=description)
 | 
					        parser = argparse.ArgumentParser(usage=usage, description=description)
 | 
				
			||||||
    except:
 | 
					    except:
 | 
				
			||||||
        parser = argparse_neo.ArgumentParser(usage=usage, description=description)
 | 
					        parser = argparse_neo.ArgumentParser(
 | 
				
			||||||
    parser.add_argument('-l', '--log-file', dest='logpath', help='Log output to file output/LOGPATH. (default: ubifs_output.log)')
 | 
					            usage=usage, description=description)
 | 
				
			||||||
    parser.add_argument('-k', '--keep-permissions', action='store_true', dest='permissions', help='Maintain file permissions, requires running as root. (default: False)')
 | 
					    parser.add_argument('-l', '--log-file', dest='logpath',
 | 
				
			||||||
    parser.add_argument('-q', '--quiet', action='store_true', dest='quiet', help='Suppress warnings and non-fatal errors. (default: False)')
 | 
					                        help='Log output to file output/LOGPATH. (default: ubifs_output.log)')
 | 
				
			||||||
    parser.add_argument('-p', '--peb-size', type=int, dest='block_size', help='Specify PEB size.')
 | 
					    parser.add_argument('-k', '--keep-permissions', action='store_true', dest='permissions',
 | 
				
			||||||
    parser.add_argument('-o', '--output-dir', dest='output_path', help='Specify output directory path.')
 | 
					                        help='Maintain file permissions, requires running as root. (default: False)')
 | 
				
			||||||
 | 
					    parser.add_argument('-q', '--quiet', action='store_true', dest='quiet',
 | 
				
			||||||
 | 
					                        help='Suppress warnings and non-fatal errors. (default: False)')
 | 
				
			||||||
 | 
					    parser.add_argument('-p', '--peb-size', type=int,
 | 
				
			||||||
 | 
					                        dest='block_size', help='Specify PEB size.')
 | 
				
			||||||
 | 
					    parser.add_argument('-o', '--output-dir', dest='output_path',
 | 
				
			||||||
 | 
					                        help='Specify output directory path.')
 | 
				
			||||||
    parser.add_argument('filepath', help='File to extract contents of.')
 | 
					    parser.add_argument('filepath', help='File to extract contents of.')
 | 
				
			||||||
    if len(sys.argv) == 1:
 | 
					    if len(sys.argv) == 1:
 | 
				
			||||||
        parser.print_help()
 | 
					        parser.print_help()
 | 
				
			||||||
@@ -58,13 +64,14 @@ if __name__ == '__main__':
 | 
				
			|||||||
            if not os.path.exists(vol_out_path):
 | 
					            if not os.path.exists(vol_out_path):
 | 
				
			||||||
                os.makedirs(vol_out_path)
 | 
					                os.makedirs(vol_out_path)
 | 
				
			||||||
            elif os.listdir(vol_out_path):
 | 
					            elif os.listdir(vol_out_path):
 | 
				
			||||||
                parser.error('Volume output directory is not empty. %s' % vol_out_path)
 | 
					                parser.error(
 | 
				
			||||||
 | 
					                    'Volume output directory is not empty. %s' % vol_out_path)
 | 
				
			||||||
            ufsfile = leb_virtual_file(uubi, image.volumes[volume])
 | 
					            ufsfile = leb_virtual_file(uubi, image.volumes[volume])
 | 
				
			||||||
            uubifs = ubifs(ufsfile)
 | 
					            uubifs = ubifs(ufsfile)
 | 
				
			||||||
            uubifs.log.log_file = log_file
 | 
					            uubifs.log.log_file = log_file
 | 
				
			||||||
            uubifs.log.log_to_file = log_to_file
 | 
					            uubifs.log.log_to_file = log_to_file
 | 
				
			||||||
            uubifs.log.quiet = quiet
 | 
					            uubifs.log.quiet = quiet
 | 
				
			||||||
            print 'Writing to: %s' % vol_out_path
 | 
					            print(('Writing to: %s' % vol_out_path))
 | 
				
			||||||
            extract_files(uubifs, vol_out_path, perms)
 | 
					            extract_files(uubifs, vol_out_path, perms)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    sys.exit(0)
 | 
					    sys.exit(0)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -68,7 +68,8 @@ class ubi_file(object):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def read_block_data(self, block):
 | 
					    def read_block_data(self, block):
 | 
				
			||||||
        self.seek(block.file_offset + block.ec_hdr.data_offset)
 | 
					        self.seek(block.file_offset + block.ec_hdr.data_offset)
 | 
				
			||||||
        buf = self._fhandle.read(block.size - block.ec_hdr.data_offset - block.vid_hdr.data_pad)
 | 
					        buf = self._fhandle.read(
 | 
				
			||||||
 | 
					            block.size - block.ec_hdr.data_offset - block.vid_hdr.data_pad)
 | 
				
			||||||
        return buf
 | 
					        return buf
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -91,7 +92,8 @@ class leb_virtual_file:
 | 
				
			|||||||
            self.seek(self.tell() + i)
 | 
					            self.seek(self.tell() + i)
 | 
				
			||||||
            return self._last_buf[offset:offset + i]
 | 
					            return self._last_buf[offset:offset + i]
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            buf = self._ubi.file.read_block_data(self._ubi.blocks[self._blocks[leb]])
 | 
					            buf = self._ubi.file.read_block_data(
 | 
				
			||||||
 | 
					                self._ubi.blocks[self._blocks[leb]])
 | 
				
			||||||
            self._last_buf = buf
 | 
					            self._last_buf = buf
 | 
				
			||||||
            self._last_leb = leb
 | 
					            self._last_leb = leb
 | 
				
			||||||
            self.seek(self.tell() + i)
 | 
					            self.seek(self.tell() + i)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
#!/usr/bin/python
 | 
					#!/usr/bin/python
 | 
				
			||||||
import struct
 | 
					import struct
 | 
				
			||||||
UBIFS_NODE_MAGIC = '1\x18\x10\x06'
 | 
					UBIFS_NODE_MAGIC = '1\x18\x10\x06'
 | 
				
			||||||
UBIFS_CRC32_INIT = 4294967295L
 | 
					UBIFS_CRC32_INIT = 4294967295
 | 
				
			||||||
UBIFS_MIN_COMPR_LEN = 128
 | 
					UBIFS_MIN_COMPR_LEN = 128
 | 
				
			||||||
UBIFS_MIN_COMPRESS_DIFF = 64
 | 
					UBIFS_MIN_COMPRESS_DIFF = 64
 | 
				
			||||||
UBIFS_ROOT_INO = 1
 | 
					UBIFS_ROOT_INO = 1
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -19,7 +19,7 @@ class log:
 | 
				
			|||||||
                    f.write('%s\n' % s)
 | 
					                    f.write('%s\n' % s)
 | 
				
			||||||
                f.close()
 | 
					                f.close()
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                print '%s' % s
 | 
					                print(('%s' % s))
 | 
				
			||||||
        if self.exit_on_except:
 | 
					        if self.exit_on_except:
 | 
				
			||||||
            sys.exit()
 | 
					            sys.exit()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,5 @@
 | 
				
			|||||||
#!/usr/bin/python
 | 
					#!/usr/bin/python
 | 
				
			||||||
import lzo
 | 
					from . import lzo
 | 
				
			||||||
import struct
 | 
					import struct
 | 
				
			||||||
import zlib
 | 
					import zlib
 | 
				
			||||||
from ubifs.defines import *
 | 
					from ubifs.defines import *
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,7 +7,8 @@ from ubifs.misc import parse_key
 | 
				
			|||||||
class common_hdr(object):
 | 
					class common_hdr(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(UBIFS_COMMON_HDR_FIELDS, struct.unpack(UBIFS_COMMON_HDR_FORMAT, buf)))
 | 
					        fields = dict(list(zip(UBIFS_COMMON_HDR_FIELDS,
 | 
				
			||||||
 | 
					                      struct.unpack(UBIFS_COMMON_HDR_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            setattr(self, key, fields[key])
 | 
					            setattr(self, key, fields[key])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -25,7 +26,8 @@ class common_hdr(object):
 | 
				
			|||||||
class sb_node(object):
 | 
					class sb_node(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(UBIFS_SB_NODE_FIELDS, struct.unpack(UBIFS_SB_NODE_FORMAT, buf)))
 | 
					        fields = dict(
 | 
				
			||||||
 | 
					            list(zip(UBIFS_SB_NODE_FIELDS, struct.unpack(UBIFS_SB_NODE_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            setattr(self, key, fields[key])
 | 
					            setattr(self, key, fields[key])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -41,7 +43,8 @@ class sb_node(object):
 | 
				
			|||||||
class mst_node(object):
 | 
					class mst_node(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(UBIFS_MST_NODE_FIELDS, struct.unpack(UBIFS_MST_NODE_FORMAT, buf)))
 | 
					        fields = dict(
 | 
				
			||||||
 | 
					            list(zip(UBIFS_MST_NODE_FIELDS, struct.unpack(UBIFS_MST_NODE_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            setattr(self, key, fields[key])
 | 
					            setattr(self, key, fields[key])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -57,7 +60,8 @@ class mst_node(object):
 | 
				
			|||||||
class dent_node(object):
 | 
					class dent_node(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(UBIFS_DENT_NODE_FIELDS, struct.unpack(UBIFS_DENT_NODE_FORMAT, buf)))
 | 
					        fields = dict(
 | 
				
			||||||
 | 
					            list(zip(UBIFS_DENT_NODE_FIELDS, struct.unpack(UBIFS_DENT_NODE_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            if key == 'key':
 | 
					            if key == 'key':
 | 
				
			||||||
                setattr(self, key, parse_key(fields[key]))
 | 
					                setattr(self, key, parse_key(fields[key]))
 | 
				
			||||||
@@ -78,7 +82,8 @@ class dent_node(object):
 | 
				
			|||||||
class data_node(object):
 | 
					class data_node(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(UBIFS_DATA_NODE_FIELDS, struct.unpack(UBIFS_DATA_NODE_FORMAT, buf)))
 | 
					        fields = dict(
 | 
				
			||||||
 | 
					            list(zip(UBIFS_DATA_NODE_FIELDS, struct.unpack(UBIFS_DATA_NODE_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            if key == 'key':
 | 
					            if key == 'key':
 | 
				
			||||||
                setattr(self, key, parse_key(fields[key]))
 | 
					                setattr(self, key, parse_key(fields[key]))
 | 
				
			||||||
@@ -100,7 +105,8 @@ class data_node(object):
 | 
				
			|||||||
class idx_node(object):
 | 
					class idx_node(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(UBIFS_IDX_NODE_FIELDS, struct.unpack(UBIFS_IDX_NODE_FORMAT, buf)))
 | 
					        fields = dict(
 | 
				
			||||||
 | 
					            list(zip(UBIFS_IDX_NODE_FIELDS, struct.unpack(UBIFS_IDX_NODE_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            setattr(self, key, fields[key])
 | 
					            setattr(self, key, fields[key])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -118,7 +124,8 @@ class idx_node(object):
 | 
				
			|||||||
class ino_node(object):
 | 
					class ino_node(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(UBIFS_INO_NODE_FIELDS, struct.unpack(UBIFS_INO_NODE_FORMAT, buf)))
 | 
					        fields = dict(
 | 
				
			||||||
 | 
					            list(zip(UBIFS_INO_NODE_FIELDS, struct.unpack(UBIFS_INO_NODE_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            if key == 'key':
 | 
					            if key == 'key':
 | 
				
			||||||
                setattr(self, key, parse_key(fields[key]))
 | 
					                setattr(self, key, parse_key(fields[key]))
 | 
				
			||||||
@@ -139,7 +146,8 @@ class ino_node(object):
 | 
				
			|||||||
class branch(object):
 | 
					class branch(object):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def __init__(self, buf):
 | 
					    def __init__(self, buf):
 | 
				
			||||||
        fields = dict(zip(UBIFS_BRANCH_FIELDS, struct.unpack(UBIFS_BRANCH_FORMAT, buf)))
 | 
					        fields = dict(
 | 
				
			||||||
 | 
					            list(zip(UBIFS_BRANCH_FIELDS, struct.unpack(UBIFS_BRANCH_FORMAT, buf))))
 | 
				
			||||||
        for key in fields:
 | 
					        for key in fields:
 | 
				
			||||||
            setattr(self, key, fields[key])
 | 
					            setattr(self, key, fields[key])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -42,7 +42,8 @@ def dents(ubifs, inodes, dent_node, path='', perms=False):
 | 
				
			|||||||
        try:
 | 
					        try:
 | 
				
			||||||
            os.symlink('%s' % inode['ino'].data, dent_path)
 | 
					            os.symlink('%s' % inode['ino'].data, dent_path)
 | 
				
			||||||
        except Exception as e:
 | 
					        except Exception as e:
 | 
				
			||||||
            ubifs.log.write('SYMLINK Fail: %s : %s' % (inode['ino'].data, dent_path))
 | 
					            ubifs.log.write('SYMLINK Fail: %s : %s' %
 | 
				
			||||||
 | 
					                            (inode['ino'].data, dent_path))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    elif dent_node.type in [UBIFS_ITYPE_BLK, UBIFS_ITYPE_CHR]:
 | 
					    elif dent_node.type in [UBIFS_ITYPE_BLK, UBIFS_ITYPE_CHR]:
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,7 +17,8 @@ def index(ubifs, lnum, offset, inodes={}):
 | 
				
			|||||||
            inodes[ino_num] = {}
 | 
					            inodes[ino_num] = {}
 | 
				
			||||||
        inodes[ino_num]['ino'] = inon
 | 
					        inodes[ino_num]['ino'] = inon
 | 
				
			||||||
    elif chdr.node_type == UBIFS_DATA_NODE:
 | 
					    elif chdr.node_type == UBIFS_DATA_NODE:
 | 
				
			||||||
        datn = extract.data_node(ubifs, lnum, offset + UBIFS_COMMON_HDR_SZ, chdr.len)
 | 
					        datn = extract.data_node(
 | 
				
			||||||
 | 
					            ubifs, lnum, offset + UBIFS_COMMON_HDR_SZ, chdr.len)
 | 
				
			||||||
        ino_num = datn.key['ino_num']
 | 
					        ino_num = datn.key['ino_num']
 | 
				
			||||||
        if ino_num not in inodes:
 | 
					        if ino_num not in inodes:
 | 
				
			||||||
            inodes[ino_num] = {}
 | 
					            inodes[ino_num] = {}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,13 +4,15 @@ from ubi_io import leb_virtual_file
 | 
				
			|||||||
from ubifs import ubifs, walk, output
 | 
					from ubifs import ubifs, walk, output
 | 
				
			||||||
from ubifs.defines import PRINT_UBIFS_KEY_HASH, PRINT_UBIFS_COMPR
 | 
					from ubifs.defines import PRINT_UBIFS_KEY_HASH, PRINT_UBIFS_COMPR
 | 
				
			||||||
from ubi.defines import PRINT_VOL_TYPE_LIST, UBI_VTBL_AUTORESIZE_FLG
 | 
					from ubi.defines import PRINT_VOL_TYPE_LIST, UBI_VTBL_AUTORESIZE_FLG
 | 
				
			||||||
output_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'output')
 | 
					output_dir = os.path.join(os.path.dirname(
 | 
				
			||||||
 | 
					    os.path.dirname(os.path.realpath(__file__))), 'output')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def extract_files(ubifs, out_path, perms=False):
 | 
					def extract_files(ubifs, out_path, perms=False):
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
        inodes = {}
 | 
					        inodes = {}
 | 
				
			||||||
        walk.index(ubifs, ubifs.master_node.root_lnum, ubifs.master_node.root_offs, inodes)
 | 
					        walk.index(ubifs, ubifs.master_node.root_lnum,
 | 
				
			||||||
 | 
					                   ubifs.master_node.root_offs, inodes)
 | 
				
			||||||
        for dent in inodes[1]['dent']:
 | 
					        for dent in inodes[1]['dent']:
 | 
				
			||||||
            output.dents(ubifs, inodes, dent, out_path, perms)
 | 
					            output.dents(ubifs, inodes, dent, out_path, perms)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -56,7 +58,8 @@ def get_ubi_params(ubi):
 | 
				
			|||||||
            else:
 | 
					            else:
 | 
				
			||||||
                ini_params[img_seq][volume]['vol_flags'] = image.volumes[volume].vol_rec.flags
 | 
					                ini_params[img_seq][volume]['vol_flags'] = image.volumes[volume].vol_rec.flags
 | 
				
			||||||
            ini_params[img_seq][volume]['vol_id'] = image.volumes[volume].vol_id
 | 
					            ini_params[img_seq][volume]['vol_id'] = image.volumes[volume].vol_id
 | 
				
			||||||
            ini_params[img_seq][volume]['vol_name'] = image.volumes[volume].name.rstrip('\x00')
 | 
					            ini_params[img_seq][volume]['vol_name'] = image.volumes[volume].name.rstrip(
 | 
				
			||||||
 | 
					                '\x00')
 | 
				
			||||||
            ini_params[img_seq][volume]['vol_alignment'] = image.volumes[volume].vol_rec.alignment
 | 
					            ini_params[img_seq][volume]['vol_alignment'] = image.volumes[volume].vol_rec.alignment
 | 
				
			||||||
            ini_params[img_seq][volume]['vol_size'] = image.volumes[volume].vol_rec.reserved_pebs * ubi.leb_size
 | 
					            ini_params[img_seq][volume]['vol_size'] = image.volumes[volume].vol_rec.reserved_pebs * ubi.leb_size
 | 
				
			||||||
            ufsfile = leb_virtual_file(ubi, image.volumes[volume])
 | 
					            ufsfile = leb_virtual_file(ubi, image.volumes[volume])
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,8 @@
 | 
				
			|||||||
# -*- coding: utf-8 -*-
 | 
					# -*- coding: utf-8 -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#from __init__ import _
 | 
					# from __init__ import _
 | 
				
			||||||
from __future__ import absolute_import
 | 
					
 | 
				
			||||||
from __future__ import print_function
 | 
					
 | 
				
			||||||
from Plugins.Extensions.NeoBoot.__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 Plugins.Extensions.NeoBoot.files.stbbranding import getNeoLocation, getKernelVersionString, getKernelImageVersion, getCPUtype, getCPUSoC, getImageNeoBoot, getBoxVuModel, getBoxHostName, getTunerModel
 | 
				
			||||||
from enigma import getDesktop
 | 
					from enigma import getDesktop
 | 
				
			||||||
@@ -160,7 +160,7 @@ class InstallImage(Screen, ConfigListScreen):
 | 
				
			|||||||
        self.Kodi = ConfigYesNo(default=False)
 | 
					        self.Kodi = ConfigYesNo(default=False)
 | 
				
			||||||
        self.BlackHole = ConfigYesNo(default=False)
 | 
					        self.BlackHole = ConfigYesNo(default=False)
 | 
				
			||||||
        for line in open("/etc/hostname"):
 | 
					        for line in open("/etc/hostname"):
 | 
				
			||||||
            if getCPUtype() == 'MIPS' and not "dm500hd" in line and not "dm800se" in line and not "dm800" in line and not "dm8000" in line :        
 | 
					            if getCPUtype() == 'MIPS' and not "dm500hd" in line and not "dm800se" in line and not "dm800" in line and not "dm8000" in line:
 | 
				
			||||||
                self.Nandsim = ConfigYesNo(default=True)
 | 
					                self.Nandsim = ConfigYesNo(default=True)
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                self.Nandsim = ConfigYesNo(default=False)
 | 
					                self.Nandsim = ConfigYesNo(default=False)
 | 
				
			||||||
@@ -193,24 +193,40 @@ class InstallImage(Screen, ConfigListScreen):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    def createSetup(self):
 | 
					    def createSetup(self):
 | 
				
			||||||
        self.list = []
 | 
					        self.list = []
 | 
				
			||||||
        self.list.append(getConfigListEntry(_('Source Image file'), self.source))
 | 
					        self.list.append(getConfigListEntry(
 | 
				
			||||||
 | 
					            _('Source Image file'), self.source))
 | 
				
			||||||
        self.list.append(getConfigListEntry(_('Image Name'), self.target))
 | 
					        self.list.append(getConfigListEntry(_('Image Name'), self.target))
 | 
				
			||||||
        self.list.append(getConfigListEntry(_('Copy files from Flash to the installed image ?'), self.CopyFiles))
 | 
					        self.list.append(getConfigListEntry(
 | 
				
			||||||
        self.list.append(getConfigListEntry(_('Copy the kernel of the installed system (recommended ?'), self.CopyKernel))
 | 
					            _('Copy files from Flash to the installed image ?'), self.CopyFiles))
 | 
				
			||||||
        self.list.append(getConfigListEntry(_('Copy the channel list ?'), self.TvList))
 | 
					        self.list.append(getConfigListEntry(
 | 
				
			||||||
        self.list.append(getConfigListEntry(_('Copy network settings LAN-WLAN ?'), self.LanWlan))
 | 
					            _('Copy the kernel of the installed system (recommended ?'), self.CopyKernel))
 | 
				
			||||||
        self.list.append(getConfigListEntry(_('Copy the drivers ? (Recommended only other image.)'), self.Sterowniki))
 | 
					        self.list.append(getConfigListEntry(
 | 
				
			||||||
        self.list.append(getConfigListEntry(_('Copy mounting disks ? (Recommended)'), self.Montowanie))
 | 
					            _('Copy the channel list ?'), self.TvList))
 | 
				
			||||||
        self.list.append(getConfigListEntry(_('Copy Settings to the new Image'), self.InstallSettings))
 | 
					        self.list.append(getConfigListEntry(
 | 
				
			||||||
        self.list.append(getConfigListEntry(_('Delete Image zip after Install ?'), self.ZipDelete))
 | 
					            _('Copy network settings LAN-WLAN ?'), self.LanWlan))
 | 
				
			||||||
        self.list.append(getConfigListEntry(_('Repair FTP ? (Recommended only other image if it does not work.)'), self.RepairFTP))
 | 
					        self.list.append(getConfigListEntry(
 | 
				
			||||||
        self.list.append(getConfigListEntry(_('Copy config SoftCam ?'), self.SoftCam))
 | 
					            _('Copy the drivers ? (Recommended only other image.)'), self.Sterowniki))
 | 
				
			||||||
        self.list.append(getConfigListEntry(_('Copy MediaPortal ?'), self.MediaPortal))
 | 
					        self.list.append(getConfigListEntry(
 | 
				
			||||||
        self.list.append(getConfigListEntry(_('Copy picon flash to image install ?'), self.PiconR))
 | 
					            _('Copy mounting disks ? (Recommended)'), self.Montowanie))
 | 
				
			||||||
        self.list.append(getConfigListEntry(_('Transfer kodi settings ?'), self.Kodi))
 | 
					        self.list.append(getConfigListEntry(
 | 
				
			||||||
        self.list.append(getConfigListEntry(_('Path BlackHole ? (Not recommended for VuPlus)'), self.BlackHole))
 | 
					            _('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(
 | 
				
			||||||
 | 
					            _('Transfer kodi settings ?'), self.Kodi))
 | 
				
			||||||
 | 
					        self.list.append(getConfigListEntry(
 | 
				
			||||||
 | 
					            _('Path BlackHole ? (Not recommended for VuPlus)'), self.BlackHole))
 | 
				
			||||||
        if getCPUtype() == 'MIPS':
 | 
					        if getCPUtype() == 'MIPS':
 | 
				
			||||||
            self.list.append(getConfigListEntry(_('Use Nandsim to install image ?'), self.Nandsim))        
 | 
					            self.list.append(getConfigListEntry(
 | 
				
			||||||
 | 
					                _('Use Nandsim to install image ?'), self.Nandsim))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def HelpInstall(self):
 | 
					    def HelpInstall(self):
 | 
				
			||||||
        self.session.open(HelpInstall)
 | 
					        self.session.open(HelpInstall)
 | 
				
			||||||
@@ -230,7 +246,8 @@ class InstallImage(Screen, ConfigListScreen):
 | 
				
			|||||||
                    self['config'].getCurrent()[1].help_window.hide()
 | 
					                    self['config'].getCurrent()[1].help_window.hide()
 | 
				
			||||||
            self.vkvar = sel[0]
 | 
					            self.vkvar = sel[0]
 | 
				
			||||||
            if self.vkvar == _('Image Name'):
 | 
					            if self.vkvar == _('Image Name'):
 | 
				
			||||||
                self.session.openWithCallback(self.VirtualKeyBoardCallback, VirtualKeyBoard, title=self['config'].getCurrent()[0], text=self['config'].getCurrent()[1].value)
 | 
					                self.session.openWithCallback(self.VirtualKeyBoardCallback, VirtualKeyBoard, title=self['config'].getCurrent()[
 | 
				
			||||||
 | 
					                                              0], text=self['config'].getCurrent()[1].value)
 | 
				
			||||||
        return
 | 
					        return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def VirtualKeyBoardCallback(self, callback=None):
 | 
					    def VirtualKeyBoardCallback(self, callback=None):
 | 
				
			||||||
@@ -246,15 +263,18 @@ class InstallImage(Screen, ConfigListScreen):
 | 
				
			|||||||
        target = self.target.value.replace(' ', '')
 | 
					        target = self.target.value.replace(' ', '')
 | 
				
			||||||
        for fn in os.listdir('%sImageBoot' % getNeoLocation()):
 | 
					        for fn in os.listdir('%sImageBoot' % getNeoLocation()):
 | 
				
			||||||
            if fn == target:
 | 
					            if fn == target:
 | 
				
			||||||
                    myerror = _('Sorry, an Image with the name ') + target + _(' is already installed.\n Please try another name.')
 | 
					                myerror = _('Sorry, an Image with the name ') + target + \
 | 
				
			||||||
 | 
					                    _(' is already installed.\n Please try another name.')
 | 
				
			||||||
                continue
 | 
					                continue
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if source == 'None':
 | 
					        if source == 'None':
 | 
				
			||||||
                myerror = _('You have to select one Image to install.\nPlease, upload your zip file in the folder: %sImagesUpload and select the image to install.')
 | 
					            myerror = _(
 | 
				
			||||||
 | 
					                'You have to select one Image to install.\nPlease, upload your zip file in the folder: %sImagesUpload and select the image to install.')
 | 
				
			||||||
        if target == '':
 | 
					        if target == '':
 | 
				
			||||||
            myerror = _('You have to provide a name for the new Image.')
 | 
					            myerror = _('You have to provide a name for the new Image.')
 | 
				
			||||||
        if target == 'Flash':
 | 
					        if target == 'Flash':
 | 
				
			||||||
                myerror = _('Sorry this name is reserved. Choose another name for the new Image.')
 | 
					            myerror = _(
 | 
				
			||||||
 | 
					                'Sorry this name is reserved. Choose another name for the new Image.')
 | 
				
			||||||
        if len(target) > 30:
 | 
					        if len(target) > 30:
 | 
				
			||||||
            myerror = _('Sorry the name of the new Image is too long.')
 | 
					            myerror = _('Sorry the name of the new Image is too long.')
 | 
				
			||||||
        if myerror:
 | 
					        if myerror:
 | 
				
			||||||
@@ -271,14 +291,16 @@ class InstallImage(Screen, ConfigListScreen):
 | 
				
			|||||||
            cmd1 = 'python ' + pluginpath + '/ex_init.py'
 | 
					            cmd1 = 'python ' + pluginpath + '/ex_init.py'
 | 
				
			||||||
            cmd = '%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s ' % (cmd1,
 | 
					            cmd = '%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s ' % (cmd1,
 | 
				
			||||||
                                                                              source,
 | 
					                                                                              source,
 | 
				
			||||||
                 target.replace(' ', '.'),
 | 
					                                                                              target.replace(
 | 
				
			||||||
 | 
					                                                                                  ' ', '.'),
 | 
				
			||||||
                                                                              str(self.CopyFiles.value),
 | 
					                                                                              str(self.CopyFiles.value),
 | 
				
			||||||
                                                                              str(self.CopyKernel.value),
 | 
					                                                                              str(self.CopyKernel.value),
 | 
				
			||||||
                                                                              str(self.TvList.value),
 | 
					                                                                              str(self.TvList.value),
 | 
				
			||||||
                                                                              str(self.LanWlan.value),
 | 
					                                                                              str(self.LanWlan.value),
 | 
				
			||||||
                                                                              str(self.Sterowniki.value),
 | 
					                                                                              str(self.Sterowniki.value),
 | 
				
			||||||
                                                                              str(self.Montowanie.value),
 | 
					                                                                              str(self.Montowanie.value),
 | 
				
			||||||
                 str(self.InstallSettings.value),
 | 
					                                                                              str(
 | 
				
			||||||
 | 
					                                                                                  self.InstallSettings.value),
 | 
				
			||||||
                                                                              str(self.ZipDelete.value),
 | 
					                                                                              str(self.ZipDelete.value),
 | 
				
			||||||
                                                                              str(self.RepairFTP.value),
 | 
					                                                                              str(self.RepairFTP.value),
 | 
				
			||||||
                                                                              str(self.SoftCam.value),
 | 
					                                                                              str(self.SoftCam.value),
 | 
				
			||||||
@@ -289,7 +311,8 @@ class InstallImage(Screen, ConfigListScreen):
 | 
				
			|||||||
                                                                              str(self.Nandsim.value))
 | 
					                                                                              str(self.Nandsim.value))
 | 
				
			||||||
            print("[MULTI-BOOT]: "), cmd
 | 
					            print("[MULTI-BOOT]: "), cmd
 | 
				
			||||||
            from Plugins.Extensions.NeoBoot.plugin import PLUGINVERSION
 | 
					            from Plugins.Extensions.NeoBoot.plugin import PLUGINVERSION
 | 
				
			||||||
                self.session.open(Console, _('NeoBoot v.%s - Install new image') % PLUGINVERSION, [message, cmd])
 | 
					            self.session.open(Console, _(
 | 
				
			||||||
 | 
					                'NeoBoot v.%s - Install new image') % PLUGINVERSION, [message, cmd])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def cancel(self):
 | 
					    def cancel(self):
 | 
				
			||||||
        self.close()
 | 
					        self.close()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,17 +4,17 @@ from Screens.Screen import Screen
 | 
				
			|||||||
from Components.Pixmap import Pixmap
 | 
					from Components.Pixmap import Pixmap
 | 
				
			||||||
import os
 | 
					import os
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#Colors (#AARRGGBB)
 | 
					# Colors (#AARRGGBB)
 | 
				
			||||||
#____Recommended colors - Zalecane kolory :
 | 
					# ____Recommended colors - Zalecane kolory :
 | 
				
			||||||
#color name="white" value="#ffffff"
 | 
					# color name="white" value="#ffffff"
 | 
				
			||||||
#color name="darkwhite" value="#00dddddd"
 | 
					# color name="darkwhite" value="#00dddddd"
 | 
				
			||||||
#color name="red" value="#f23d21"
 | 
					# color name="red" value="#f23d21"
 | 
				
			||||||
#color name="green" value="#389416"
 | 
					# color name="green" value="#389416"
 | 
				
			||||||
#color name="blue" value="#0064c7"
 | 
					# color name="blue" value="#0064c7"
 | 
				
			||||||
#color name="yellow" value="#bab329"
 | 
					# color name="yellow" value="#bab329"
 | 
				
			||||||
#color name="orange" value="#00ffa500"
 | 
					# color name="orange" value="#00ffa500"
 | 
				
			||||||
#color name="gray" value="#808080"
 | 
					# color name="gray" value="#808080"
 | 
				
			||||||
#color name="lightgrey" value="#009b9b9b"
 | 
					# color name="lightgrey" value="#009b9b9b"
 | 
				
			||||||
#        green = '#00389416' lub #00389416
 | 
					#        green = '#00389416' lub #00389416
 | 
				
			||||||
#        red = '#00ff2525'
 | 
					#        red = '#00ff2525'
 | 
				
			||||||
#        yellow = '#00ffe875'
 | 
					#        yellow = '#00ffe875'
 | 
				
			||||||
@@ -23,14 +23,14 @@ import os
 | 
				
			|||||||
#   jasny-blue  =  #99FFFF
 | 
					#   jasny-blue  =  #99FFFF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Zamiast font=Regular ktory nie rozpoznaje polskich znakow np. na VTi, mozesz zmienic na ponizsze font="*:
 | 
					# Zamiast font=Regular ktory nie rozpoznaje polskich znakow np. na VTi, mozesz zmienic na ponizsze font="*:
 | 
				
			||||||
    #   font -  genel
 | 
					#   font -  genel
 | 
				
			||||||
    #   font -  baslk
 | 
					#   font -  baslk
 | 
				
			||||||
    #   font -  tasat
 | 
					#   font -  tasat
 | 
				
			||||||
    #   font -  dugme
 | 
					#   font -  dugme
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#  <widget name="config" position="1177,256" size="703,717" itemHeight="43" font="genel;30" scrollbarMode="showOnDemand" foregroundColor="#00FFFFFF" backgroundColor="#1A0F0F0F" foregroundColorSelected="#00FFFFF" backgroundColorSelected="#1A27408B" scrollbarSliderBorderWidth="1" scrollbarWidth="8" scrollbarSliderForegroundColor="#00FFFFFF" scrollbarSliderBorderColor="#0027408B" enableWrapAround="1" transparent="1" />
 | 
					#  <widget name="config" position="1177,256" size="703,717" itemHeight="43" font="genel;30" scrollbarMode="showOnDemand" foregroundColor="#00FFFFFF" backgroundColor="#1A0F0F0F" foregroundColorSelected="#00FFFFF" backgroundColorSelected="#1A27408B" scrollbarSliderBorderWidth="1" scrollbarWidth="8" scrollbarSliderForegroundColor="#00FFFFFF" scrollbarSliderBorderColor="#0027408B" enableWrapAround="1" transparent="1" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###____ Skin Ultra HD - ImageChooseFULLHD   ___ mod. gutosie___
 | 
					# ____ Skin Ultra HD - ImageChooseFULLHD   ___ mod. gutosie___
 | 
				
			||||||
ImageChooseFULLHD = """
 | 
					ImageChooseFULLHD = """
 | 
				
			||||||
<screen name="ImageChooseFULLHD" position="center,center" size="1920,1080" title=" " flags="wfNoBorder" backgroundColor="transparent">
 | 
					<screen name="ImageChooseFULLHD" position="center,center" size="1920,1080" title=" " flags="wfNoBorder" backgroundColor="transparent">
 | 
				
			||||||
  <eLabel backgroundColor="black" font="dugme; 30" foregroundColor="#99FFFF" position="70,50" size="298,55" valign="center" text="NEOBoot Multi-image" transparent="1" />
 | 
					  <eLabel backgroundColor="black" font="dugme; 30" foregroundColor="#99FFFF" position="70,50" size="298,55" valign="center" text="NEOBoot Multi-image" transparent="1" />
 | 
				
			||||||
@@ -88,7 +88,7 @@ ImageChooseFULLHD = """
 | 
				
			|||||||
"""
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###____ Skin Ultra HD - ImageChooseULTRAHD ___ mod. gutosie___
 | 
					# ____ Skin Ultra HD - ImageChooseULTRAHD ___ mod. gutosie___
 | 
				
			||||||
ImageChooseULTRAHD = """
 | 
					ImageChooseULTRAHD = """
 | 
				
			||||||
<screen name="NeoBootImageChoose" position="0,0" size="3840,2160" flags="wfNoBorder" backgroundColor="#ff111111">
 | 
					<screen name="NeoBootImageChoose" position="0,0" size="3840,2160" flags="wfNoBorder" backgroundColor="#ff111111">
 | 
				
			||||||
  <widget source="Title" render="Label" position="174,108" size="1575,150" font="baslk;102" valign="bottom" foregroundColor="#00FFFFFF" backgroundColor="#1A0F0F0F" noWrap="1" transparent="1" />
 | 
					  <widget source="Title" render="Label" position="174,108" size="1575,150" font="baslk;102" valign="bottom" foregroundColor="#00FFFFFF" backgroundColor="#1A0F0F0F" noWrap="1" transparent="1" />
 | 
				
			||||||
@@ -137,7 +137,7 @@ ImageChooseULTRAHD = """
 | 
				
			|||||||
</screen>"""
 | 
					</screen>"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###____ Skin HD - ImageChoose ___mod. gutosie ___
 | 
					# ____ Skin HD - ImageChoose ___mod. gutosie ___
 | 
				
			||||||
ImageChooseHD = """
 | 
					ImageChooseHD = """
 | 
				
			||||||
<screen name="NeoBootImageChoose" position="center,center" size="1280, 720" backgroundColor="transpBlack">
 | 
					<screen name="NeoBootImageChoose" position="center,center" size="1280, 720" backgroundColor="transpBlack">
 | 
				
			||||||
  <ePixmap position="0,0" zPosition="-1" size="1274,720" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/1frame_base-fs8.png" />
 | 
					  <ePixmap position="0,0" zPosition="-1" size="1274,720" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/1frame_base-fs8.png" />
 | 
				
			||||||
@@ -184,7 +184,7 @@ ImageChooseHD = """
 | 
				
			|||||||
"""
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###____ Skin FULLHD - MyUpgradeFULLHD ___mod. gutosie ___
 | 
					# ____ Skin FULLHD - MyUpgradeFULLHD ___mod. gutosie ___
 | 
				
			||||||
MyUpgradeFULLHD = """
 | 
					MyUpgradeFULLHD = """
 | 
				
			||||||
<screen name="MyUpgradeFULLHD" position="center,center" size="1380,570" title="Tools Neoboot">
 | 
					<screen name="MyUpgradeFULLHD" position="center,center" size="1380,570" title="Tools Neoboot">
 | 
				
			||||||
                  <ePixmap position="594,255" zPosition="-2" size="623,313" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrix.png" />
 | 
					                  <ePixmap position="594,255" zPosition="-2" size="623,313" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrix.png" />
 | 
				
			||||||
@@ -203,7 +203,7 @@ MyUpgradeFULLHD = """
 | 
				
			|||||||
                </screen>"""
 | 
					                </screen>"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###____ Skin UltraHD - MyUpgradeUltraHD ___mod. gutosie ___
 | 
					# ____ Skin UltraHD - MyUpgradeUltraHD ___mod. gutosie ___
 | 
				
			||||||
MyUpgradeUltraHD = """
 | 
					MyUpgradeUltraHD = """
 | 
				
			||||||
<screen name="MyUpgradeUltraHD" position="center,center" size="2100,1020" flags="wfNoBorder" backgroundColor="#ff111111">
 | 
					<screen name="MyUpgradeUltraHD" position="center,center" size="2100,1020" flags="wfNoBorder" backgroundColor="#ff111111">
 | 
				
			||||||
        <widget name="label1" position="180,210" size="1740,78" font="genel;60" halign="center" foregroundColor="#00FFFFFF" backgroundColor="#1A0F0F0F" zPosition="1" transparent="1" />
 | 
					        <widget name="label1" position="180,210" size="1740,78" font="genel;60" halign="center" foregroundColor="#00FFFFFF" backgroundColor="#1A0F0F0F" zPosition="1" transparent="1" />
 | 
				
			||||||
@@ -220,7 +220,7 @@ MyUpgradeUltraHD = """
 | 
				
			|||||||
        </screen>"""
 | 
					        </screen>"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###____ Skin MyUpgradeHD - MyUpgradeHD ___mod. gutosie ___
 | 
					# ____ Skin MyUpgradeHD - MyUpgradeHD ___mod. gutosie ___
 | 
				
			||||||
MyUpgradeHD = """
 | 
					MyUpgradeHD = """
 | 
				
			||||||
<screen name="MyUpgradeHD" position="center,center" size="1127,569" title="Tools NeoBoot">
 | 
					<screen name="MyUpgradeHD" position="center,center" size="1127,569" title="Tools NeoBoot">
 | 
				
			||||||
                  <ePixmap position="492,223" zPosition="-2" size="589,298" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrix.png" />
 | 
					                  <ePixmap position="492,223" zPosition="-2" size="589,298" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrix.png" />
 | 
				
			||||||
@@ -239,7 +239,7 @@ MyUpgradeHD = """
 | 
				
			|||||||
                </screen>"""
 | 
					                </screen>"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###____ Skin NeoBootInstallationFULLHD - NeoBootInstallationFULLHD ___mod. gutosie ___
 | 
					# ____ Skin NeoBootInstallationFULLHD - NeoBootInstallationFULLHD ___mod. gutosie ___
 | 
				
			||||||
NeoBootInstallationFULLHD = """
 | 
					NeoBootInstallationFULLHD = """
 | 
				
			||||||
<screen name="NeoBootInstallationFULLHD" position="410,138" size="1200,850" title="NeoBoot">
 | 
					<screen name="NeoBootInstallationFULLHD" position="410,138" size="1200,850" title="NeoBoot">
 | 
				
			||||||
        <ePixmap position="643,282" zPosition="-2" size="531,331" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrix.png" />
 | 
					        <ePixmap position="643,282" zPosition="-2" size="531,331" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/matrix.png" />
 | 
				
			||||||
@@ -264,7 +264,7 @@ NeoBootInstallationFULLHD = """
 | 
				
			|||||||
        <widget name="key_blue" position="856,761" zPosition="1" size="326,52" font="dugme; 28" halign="center" valign="center" backgroundColor="blue" transparent="1" foregroundColor="blue" />
 | 
					        <widget name="key_blue" position="856,761" zPosition="1" size="326,52" font="dugme; 28" halign="center" valign="center" backgroundColor="blue" transparent="1" foregroundColor="blue" />
 | 
				
			||||||
        </screen>"""
 | 
					        </screen>"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###____ Skin NeoBootInstallationUltraHD - NeoBootInstallationUltraHD ___mod. gutosie ___
 | 
					# ____ Skin NeoBootInstallationUltraHD - NeoBootInstallationUltraHD ___mod. gutosie ___
 | 
				
			||||||
NeoBootInstallationUltraHD = """
 | 
					NeoBootInstallationUltraHD = """
 | 
				
			||||||
<screen name="NeoBootInstallationUltraHD" position="0,0" size="3840,2160" flags="wfNoBorder" backgroundColor="#ff111111">
 | 
					<screen name="NeoBootInstallationUltraHD" position="0,0" size="3840,2160" flags="wfNoBorder" backgroundColor="#ff111111">
 | 
				
			||||||
        <widget source="Title" render="Label" position="174,108" size="1575,150" font="baslk;102" valign="bottom" foregroundColor="#00FFFFFF" backgroundColor="#1A0F0F0F" noWrap="1" transparent="1" />
 | 
					        <widget source="Title" render="Label" position="174,108" size="1575,150" font="baslk;102" valign="bottom" foregroundColor="#00FFFFFF" backgroundColor="#1A0F0F0F" noWrap="1" transparent="1" />
 | 
				
			||||||
@@ -296,7 +296,7 @@ NeoBootInstallationUltraHD = """
 | 
				
			|||||||
        </screen>"""
 | 
					        </screen>"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
###____ Skin NeoBootInstallationHD - NeoBootInstallationHD ___mod. gutosie ___
 | 
					# ____ Skin NeoBootInstallationHD - NeoBootInstallationHD ___mod. gutosie ___
 | 
				
			||||||
NeoBootInstallationHD = """
 | 
					NeoBootInstallationHD = """
 | 
				
			||||||
<screen position="center, center" size="835, 500" title="NeoBoot">
 | 
					<screen position="center, center" size="835, 500" title="NeoBoot">
 | 
				
			||||||
  <ePixmap position="0,0" zPosition="-1" size="835,500" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/frame835x500.png"  />
 | 
					  <ePixmap position="0,0" zPosition="-1" size="835,500" pixmap="/usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/images/frame835x500.png"  />
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user