예제 #1
0
    def init(self):
        if os.path.isfile("/tmp/extip"):
            os.system("rm -f /tmp/extip")

        self.softcam = CamControl('softcam')
        print "# selected ", self.softcam.current()

        self.link_softcam = os.readlink('/etc/init.d/softcam')
        self.link_cardserver = os.readlink('/etc/init.d/cardserver')
        if self.link_softcam.find('mgcamd') != -1:
            self.readNewcsPort()
            if self.link_cardserver.find('newcs') != -1:
                self.type = "NEWCAMD"
                self.setTitle("SETUP LOADER - NEWCAMD")
            else:
                self.type = "None"
                self.setTitle("SETUP LOADER - None")
        elif self.link_softcam.find('CCcam') != -1:
            self.readCCcamPort()
            self.setTitle("SETUP LOADER - CCCAM")
            if self.link_cardserver.find('oscam') != -1:
                self.type = "CCCAM+OSCAM"
            elif self.link_cardserver.find('newcs') != -1:
                self.type = "CCCAM+NEWCS"
            else:
                self.type = "CCCAM"
        else:
            self.type = "None"
            self.setTitle("SETUP LOADER - None")
예제 #2
0
 def createMenu(self):
     try:
         test = self.index
     except:
         return
     self.list = []
     if self.index == self.STATE_UPDATE:
         if config.misc.installwizard.hasnetwork.value:
             self.list.append(
                 getConfigListEntry(
                     _("Your internet connection is working (ip: %s)") %
                     (self.ipConfigEntry.getText()), self.enabled))
         else:
             self.list.append(
                 getConfigListEntry(
                     _("Your receiver does not have an internet connection"
                       ), self.enabled))
     elif self.index == self.STATE_CHOISE_CHANNELLIST:
         self.list.append(
             getConfigListEntry(_("Install channel list"), self.enabled))
         if self.enabled.value:
             self.list.append(
                 getConfigListEntry(_("Channel list type"),
                                    self.channellist_type))
     elif self.index == self.STATE_CHOISE_SOFTCAM:
         self.list.append(
             getConfigListEntry(_("Install softcam"), self.enabled))
         if self.enabled.value:
             self.list.append(
                 getConfigListEntry(_("Softcam type"), self.softcam_type))
     elif self.index == self.STATE_RUN_SOFTCAM:
         self.softcam = CamControl('softcam')
         softcams = self.softcam.getList()
         for scam in softcams:
             self.list.append(getConfigListEntry(_(scam), self.softcams))
     self["config"].list = self.list
     self["config"].l.setList(self.list)