Example #1
0
 def delay(self, val):
     message = _(
         'Changes need a system restart to take effect.\nRestart your %s %s now?'
     ) % (getMachineBrand(), getMachineName())
     ybox = self.session.openWithCallback(self.restartBox, MessageBox,
                                          message, MessageBox.TYPE_YESNO)
     ybox.setTitle(
         _('Restart %s %s.') % (getMachineBrand(), getMachineName()))
Example #2
0
 def __init__(self, session):
     Screen.__init__(self, session)
     self.list = []
     self.device_type = 'auto'
     self.device_uuid = ''
     ConfigListScreen.__init__(self, self.list)
     Screen.setTitle(self, _('Choose where to mount your devices to:'))
     self['key_green'] = Label(_('Save'))
     self['key_red'] = Label(_('Cancel'))
     self['Linconn'] = Label(
         _('Wait please while scanning your %s %s devices...') %
         (getMachineBrand(), getMachineName()))
     self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {
         'green': self.saveMypoints,
         'red': self.close,
         'back': self.close
     })
     self.updateList()
Example #3
0
    def __init__(self, session, args=0):
        Screen.__init__(self, session)
        self.session = session
        self.MODEL = getBoxType()
        self.OEM = getBrandOEM()
        self.MACHINEBUILD = getMachineBuild()
        self.MACHINENAME = getMachineName()
        self.MACHINEBRAND = getMachineBrand()
        self.IMAGEFOLDER = getImageFolder()
        self.UBINIZE_ARGS = getMachineUBINIZE()
        self.MKUBIFS_ARGS = getMachineMKUBIFS()
        self.MTDKERNEL = getMachineMtdKernel()
        self.ROOTFSBIN = getMachineRootFile()
        self.KERNELBIN = getMachineKernelFile()
        self.ROOTFSTYPE = getImageFileSystem()
        print "[FULL BACKUP] BOX MACHINEBUILD = >%s<" % self.MACHINEBUILD
        print "[FULL BACKUP] BOX MACHINENAME = >%s<" % self.MACHINENAME
        print "[FULL BACKUP] BOX MACHINEBRAND = >%s<" % self.MACHINEBRAND
        print "[FULL BACKUP] BOX MODEL = >%s<" % self.MODEL
        print "[FULL BACKUP] OEM MODEL = >%s<" % self.OEM
        print "[FULL BACKUP] IMAGEFOLDER = >%s<" % self.IMAGEFOLDER
        print "[FULL BACKUP] UBINIZE = >%s<" % self.UBINIZE_ARGS
        print "[FULL BACKUP] MKUBIFS = >%s<" % self.MKUBIFS_ARGS
        print "[FULL BACKUP] MTDKERNEL = >%s<" % self.MTDKERNEL
        print "[FULL BACKUP] ROOTFSTYPE = >%s<" % self.ROOTFSTYPE

        self["key_green"] = Button("USB")
        self["key_red"] = Button("HDD")
        self["key_blue"] = Button(_("Exit"))
        self["key_yellow"] = Button("Create path usb")
        self["info-usb"] = Label(
            _("USB = Do you want to make a back-up on USB?\nThis will take between 4 and 15 minutes depending on the used filesystem and is fully automatic.\nMake sure you first insert an USB flash drive before you select USB."
              ))
        self["info-hdd"] = Label(
            _("HDD = Do you want to make an USB-back-up image on HDD? \nThis only takes 2 or 10 minutes and is fully automatic."
              ))
        self["actions"] = ActionMap(
            ["OkCancelActions", "ColorActions"], {
                "blue": self.quit,
                "yellow": self.yellow,
                "green": self.green,
                "red": self.red,
                "cancel": self.quit,
            }, -2)
Example #4
0
	def __init__(self, session, args = 0):
		Screen.__init__(self, session)
		self.session = session
		self.MODEL = getBoxType()
		self.OEM = getBrandOEM()
		self.MACHINEBUILD = getMachineBuild()
		self.MACHINENAME = getMachineName()
		self.MACHINEBRAND = getMachineBrand()
		self.IMAGEFOLDER = getImageFolder()
		self.UBINIZE_ARGS = getMachineUBINIZE()
		self.MKUBIFS_ARGS = getMachineMKUBIFS()
		self.MTDKERNEL = getMachineMtdKernel()
		self.ROOTFSBIN = getMachineRootFile()
		self.KERNELBIN = getMachineKernelFile()
		self.ROOTFSTYPE = getImageFileSystem()
		print "[FULL BACKUP] BOX MACHINEBUILD = >%s<" %self.MACHINEBUILD
		print "[FULL BACKUP] BOX MACHINENAME = >%s<" %self.MACHINENAME
		print "[FULL BACKUP] BOX MACHINEBRAND = >%s<" %self.MACHINEBRAND
		print "[FULL BACKUP] BOX MODEL = >%s<" %self.MODEL
		print "[FULL BACKUP] OEM MODEL = >%s<" %self.OEM
		print "[FULL BACKUP] IMAGEFOLDER = >%s<" %self.IMAGEFOLDER
		print "[FULL BACKUP] UBINIZE = >%s<" %self.UBINIZE_ARGS
		print "[FULL BACKUP] MKUBIFS = >%s<" %self.MKUBIFS_ARGS
		print "[FULL BACKUP] MTDKERNEL = >%s<" %self.MTDKERNEL
		print "[FULL BACKUP] ROOTFSTYPE = >%s<" %self.ROOTFSTYPE
		
		self["key_green"] = Button("USB")
		self["key_red"] = Button("HDD")
		self["key_blue"] = Button(_("Exit"))
		self["key_yellow"] = Button("Create path usb")
		self["info-usb"] = Label(_("USB = Do you want to make a back-up on USB?\nThis will take between 4 and 15 minutes depending on the used filesystem and is fully automatic.\nMake sure you first insert an USB flash drive before you select USB."))
		self["info-hdd"] = Label(_("HDD = Do you want to make an USB-back-up image on HDD? \nThis only takes 2 or 10 minutes and is fully automatic."))
		self["actions"] = ActionMap(["OkCancelActions", "ColorActions"], 
		{
			"blue": self.quit,
			"yellow": self.yellow,
			"green": self.green,
			"red": self.red,
			"cancel": self.quit,
		}, -2)
Example #5
0
    def imageInfo(self):
        AboutText = _("Full Image Backup ")
        AboutText += _("sfteam") + "\n"
        AboutText += _("Support at") + " http://foros.sfteam.es/\n\n"
        AboutText += _("[Image Info]\n")
        AboutText += _("Model: %s %s\n") % (getMachineBrand(),
                                            getMachineName())
        AboutText += _("Backup Date: %s\n") % strftime("%Y-%m-%d",
                                                       localtime(self.START))

        if path.exists('/proc/stb/info/chipset'):
            AboutText += _("Chipset: BCM%s") % about.getChipSetString().lower(
            ).replace('\n', '').replace('bcm', '') + "\n"

        AboutText += _("CPU: %s") % about.getCPUString() + "\n"
        AboutText += _("Cores: %s") % about.getCpuCoresString() + "\n"

        AboutText += _("Version: %s") % getImageVersion() + "\n"
        AboutText += _("Build: %s") % getImageBuild() + "\n"
        AboutText += _("Kernel: %s") % about.getKernelVersionString() + "\n"

        string = getDriverDate()
        year = string[0:4]
        month = string[4:6]
        day = string[6:8]
        driversdate = '-'.join((year, month, day))
        AboutText += _("Drivers:\t%s") % driversdate + "\n"

        AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"

        AboutText += _("[Enigma2 Settings]\n")
        AboutText += commands.getoutput("cat /etc/enigma2/settings")
        AboutText += _("\n\n[User - bouquets (TV)]\n")
        try:
            f = open("/etc/enigma2/bouquets.tv", "r")
            lines = f.readlines()
            f.close()
            for line in lines:
                if line.startswith("#SERVICE:"):
                    bouqet = line.split()
                    if len(bouqet) > 3:
                        bouqet[3] = bouqet[3].replace('"', '')
                        f = open("/etc/enigma2/" + bouqet[3], "r")
                        userbouqet = f.readline()
                        AboutText += userbouqet.replace('#NAME ', '')
                        f.close()
        except:
            AboutText += "Error reading bouquets.tv"

        AboutText += _("\n[User - bouquets (RADIO)]\n")
        try:
            f = open("/etc/enigma2/bouquets.radio", "r")
            lines = f.readlines()
            f.close()
            for line in lines:
                if line.startswith("#SERVICE:"):
                    bouqet = line.split()
                    if len(bouqet) > 3:
                        bouqet[3] = bouqet[3].replace('"', '')
                        f = open("/etc/enigma2/" + bouqet[3], "r")
                        userbouqet = f.readline()
                        AboutText += userbouqet.replace('#NAME ', '')
                        f.close()
        except:
            AboutText += "Error reading bouquets.radio"

        AboutText += _("\n[Installed Plugins]\n")
        AboutText += commands.getoutput(
            "opkg list_installed | grep enigma2-plugin-")

        return AboutText
Example #6
0
	def imageInfo(self):
		AboutText = _("Full Image Backup ")
		AboutText += _("sfteam") + "\n"
		AboutText += _("Support at") + " http://foros.sfteam.es/\n\n"
		AboutText += _("[Image Info]\n")
		AboutText += _("Model: %s %s\n") % (getMachineBrand(), getMachineName())
		AboutText += _("Backup Date: %s\n") % strftime("%Y-%m-%d", localtime(self.START))

		if path.exists('/proc/stb/info/chipset'):
			AboutText += _("Chipset: BCM%s") % about.getChipSetString().lower().replace('\n','').replace('bcm','') + "\n"

		AboutText += _("CPU: %s") % about.getCPUString() + "\n"
		AboutText += _("Cores: %s") % about.getCpuCoresString() + "\n"

		AboutText += _("Version: %s") % getImageVersion() + "\n"
		AboutText += _("Build: %s") % getImageBuild() + "\n"
		AboutText += _("Kernel: %s") % about.getKernelVersionString() + "\n"

		string = getDriverDate()
		year = string[0:4]
		month = string[4:6]
		day = string[6:8]
		driversdate = '-'.join((year, month, day))
		AboutText += _("Drivers:\t%s") % driversdate + "\n"

		AboutText += _("Last update:\t%s") % getEnigmaVersionString() + "\n\n"

		AboutText += _("[Enigma2 Settings]\n")
		AboutText += commands.getoutput("cat /etc/enigma2/settings")
		AboutText += _("\n\n[User - bouquets (TV)]\n")
		try:
			f = open("/etc/enigma2/bouquets.tv","r")
			lines = f.readlines()
			f.close()
			for line in lines:
				if line.startswith("#SERVICE:"):
					bouqet = line.split()
					if len(bouqet) > 3:
						bouqet[3] = bouqet[3].replace('"','')
						f = open("/etc/enigma2/" + bouqet[3],"r")
						userbouqet = f.readline()
						AboutText += userbouqet.replace('#NAME ','')
						f.close()
		except:
			AboutText += "Error reading bouquets.tv"
			
		AboutText += _("\n[User - bouquets (RADIO)]\n")
		try:
			f = open("/etc/enigma2/bouquets.radio","r")
			lines = f.readlines()
			f.close()
			for line in lines:
				if line.startswith("#SERVICE:"):
					bouqet = line.split()
					if len(bouqet) > 3:
						bouqet[3] = bouqet[3].replace('"','')
						f = open("/etc/enigma2/" + bouqet[3],"r")
						userbouqet = f.readline()
						AboutText += userbouqet.replace('#NAME ','')
						f.close()
		except:
			AboutText += "Error reading bouquets.radio"

		AboutText += _("\n[Installed Plugins]\n")
		AboutText += commands.getoutput("opkg list_installed | grep enigma2-plugin-")

		return AboutText
Example #7
0
 def delay(self, val):
     message = _('Changes need a system restart to take effect.\nRestart your %s %s now?') % (getMachineBrand(), getMachineName())
     ybox = self.session.openWithCallback(self.restartBox, MessageBox, message, MessageBox.TYPE_YESNO)
     ybox.setTitle(_('Restart %s %s.') % (getMachineBrand(), getMachineName()))
Example #8
0
 def __init__(self, session):
     Screen.__init__(self, session)
     self.list = []
     self.device_type = 'auto'
     self.device_uuid = ''
     ConfigListScreen.__init__(self, self.list)
     Screen.setTitle(self, _('Choose where to mount your devices to:'))
     self['key_green'] = Label(_('Save'))
     self['key_red'] = Label(_('Cancel'))
     self['Linconn'] = Label(_('Wait please while scanning your %s %s devices...') % (getMachineBrand(), getMachineName()))
     self['actions'] = ActionMap(['WizardActions', 'ColorActions'], {'green': self.saveMypoints,
      'red': self.close,
      'back': self.close})
     self.updateList()
Example #9
0
from Screens.ChoiceBox import ChoiceBox
from Screens.Screen import Screen
from Screens.Console import SFConsole2
from Screens.HelpMenu import HelpableScreen
from Screens.TaskView import JobView
from Tools.Downloader import downloadWithProgress
import urllib2
import os
import shutil
import math
from SFtoolbox import getBoxType,  getImageDistro, getMachineName, getMachineBrand, getImageVersion
distro =  getImageDistro()
ImageVersion = getImageVersion()

ImageVersion3 = ''
if getMachineBrand() == "Vu+":
	ImageVersion3= os.popen("cat /etc/opkg/mips32el-feed.conf | grep -o -e 4.2gl -e 4.2-old").read().rstrip()

#############################################################################################################
image = 0 # 0=SFTeamBeta / 1=SFTeamStable
if distro.lower() == "sfteam":
	image = 1
elif distro.lower() == "sfteambeta":
	image = 0

feedurl_sft = 'https://releases.sfteam.es/4.2.2'
feedurl_sft2 = 'https://releases.sfteam.es/4.2.2'
imagePath = '/media/usb/images'
flashPath = '/media/usb/images/flash'
flashTmp = '/media/usb/images/tmp'
ofgwritePath = '/usr/bin/ofgwrite'