Logo Search packages:      
Sourcecode: jockey version File versions  Download package

def jockey::oslib::OSLib::__init__ (   self  ) 

Set default paths and load the module blacklist.

Distributors might want to override some default paths.

Reimplemented in sandbox::TestOSLib, and sandbox::AllAvailOSLib.

Definition at line 28 of file oslib.py.

00028                       :
        '''Set default paths and load the module blacklist.
        
        Distributors might want to override some default paths.
        '''
        # default paths

        # /sys/ path; the main purpose of changing this is for test
        # suites, but some vendors might have /sys in a nonstandard place
        self.sys_dir = '/sys'

        # path to a modprobe.d configuration file where kernel modules are
        # enabled and disabled with blacklisting
        self.module_blacklist_file = '/etc/modprobe.d/blacklist-local'

        # path to modinfo binary
        self.modinfo_path = '/sbin/modinfo'

        # path to modprobe binary
        self.modprobe_path = '/sbin/modprobe'

        # path to kernel's list of loaded modules
        self.proc_modules = '/proc/modules'

        # default path to custom handlers
        self.handler_dir = '/usr/share/jockey/handlers'

        # default paths to modalias files (directory entries will consider all
        # files in them)
        self.modaliases = [
            '/lib/modules/%s/modules.alias' % os.uname()[2],
            '/usr/share/jockey/modaliases/',
        ]

        # path to X.org configuration file
        self.xorg_conf_path = '/etc/X11/xorg.conf'

        # directory where backup files are stored (like previous xorg.conf)
        self.backup_dir = '/var/cache/jockey'

        if not os.path.isdir(self.backup_dir):
            print >> sys.stderr, 'ERROR: cache directory %s does not exist. Aborting.' % \
                self.backup_dir
            sys.exit(1)

        # cache file for previously seen/newly used handlers lists (for --check)
        self.check_cache = os.path.join(self.backup_dir, 'check')

        self._load_module_blacklist()

        self._get_os_version()

    # 
    # The following functions MUST be implemented by distributors
    #


Generated by  Doxygen 1.6.0   Back to index