def used(self):
        '''Return if the handler is currently in use.'''

        return KernelModuleHandler.used(self) and self.enabled() and \
            not (KernelModuleHandler.module_loaded('b43') or
            KernelModuleHandler.module_loaded('b43legacy') or
            KernelModuleHandler.module_loaded('bcm43xx'))
Example #2
0
    def used(self):
        """Return if the handler is currently in use."""

        return (
            KernelModuleHandler.used(self)
            and self.enabled()
            and not (
                KernelModuleHandler.module_loaded("b43")
                or KernelModuleHandler.module_loaded("b43legacy")
                or KernelModuleHandler.module_loaded("bcm43xx")
            )
        )
    def enabled(self):
        km = KernelModuleHandler.enabled(self)
        bcm = OSLib.inst.module_blacklisted('bcm43xx')
        b43 = OSLib.inst.module_blacklisted('b43')
        b43_legacy = OSLib.inst.module_blacklisted('b43legacy')
        b43_loaded = KernelModuleHandler.module_loaded('bcm43xx') or \
                     KernelModuleHandler.module_loaded('b43')   or \
                     KernelModuleHandler.module_loaded('b43legacy')
        logging.debug(
            'BroadcomWLHandler enabled(): kmod %s, bcm43xx: %s, b43: %s, b43legacy: %s'
            % (km and 'enabled' or 'disabled', bcm and 'blacklisted'
               or 'enabled', b43 and 'blacklisted'
               or 'enabled', b43_legacy and 'blacklisted' or 'enabled'))

        return (km and not b43_loaded) or (km and bcm and b43 and b43_legacy)
    def used(self):
        '''Return if the handler is currently in use.'''

        if self.changed() and self.enabled():
            return False

        # See if "nvidia" is loaded and if the alias corresponds to nvidia_$flavour
        return KernelModuleHandler.module_loaded(self._module_alias) and \
               self._alternatives.resolve_module_alias(self._module_alias) == self.module and \
               (self.package is None or OSLib.inst.package_installed(self.package))
Example #5
0
    def used(self):
        '''Return if the handler is currently in use.'''

        if self.changed() and self.enabled():
            return False
        
        # See if "nvidia" is loaded and if the alias corresponds to nvidia_$flavour
        return KernelModuleHandler.module_loaded(self._module_alias) and \
               self._alternatives.resolve_module_alias(self._module_alias) == self.module and \
               (self.package is None or OSLib.inst.package_installed(self.package))
Example #6
0
    def enables_composite(self):
        '''Return whether this driver supports the composite extension.'''

        # When using an upstream installation, or -new/-legacy etc., we already
        # have composite
        if KernelModuleHandler.module_loaded('nvidia'):
            logging.debug('enables_composite(): already using nvidia driver from nondefault package')
            return False

        # neither vesa nor nv support composite, so safe to say yes here
        return True
Example #7
0
    def enabled(self):
        km = KernelModuleHandler.enabled(self)
        bcm = OSLib.inst.module_blacklisted("bcm43xx")
        b43 = OSLib.inst.module_blacklisted("b43")
        b43_legacy = OSLib.inst.module_blacklisted("b43legacy")
        b43_loaded = (
            KernelModuleHandler.module_loaded("bcm43xx")
            or KernelModuleHandler.module_loaded("b43")
            or KernelModuleHandler.module_loaded("b43legacy")
        )
        logging.debug(
            "BroadcomWLHandler enabled(): kmod %s, bcm43xx: %s, b43: %s, b43legacy: %s"
            % (
                km and "enabled" or "disabled",
                bcm and "blacklisted" or "enabled",
                b43 and "blacklisted" or "enabled",
                b43_legacy and "blacklisted" or "enabled",
            )
        )

        return (km and not b43_loaded) or (km and bcm and b43 and b43_legacy)
    def enables_composite(self):
        '''Return whether this driver supports the composite extension.'''

        # When using an upstream installation, or -new/-legacy etc., we already
        # have composite
        if KernelModuleHandler.module_loaded('nvidia'):
            logging.debug(
                'enables_composite(): already using nvidia driver from nondefault package'
            )
            return False

        # neither vesa nor nv support composite, so safe to say yes here
        return True