예제 #1
0
파일: utils.py 프로젝트: Pardus-Linux/zorg
def jailEnabled():
    xorg_options = get_kernel_option("xorg")

    if not "nojail" in xorg_options:
        if "thin" in get_kernel_option("mudur") or "jail" in xorg_options:
            print "Jail is enabled"
            return True
    return False
예제 #2
0
def jailEnabled():
    xorg_options = get_kernel_option("xorg")

    if not "nojail" in xorg_options:
        if "thin" in get_kernel_option("mudur") or "jail" in xorg_options:
            print "Jail is enabled"
            return True
    return False
예제 #3
0
    def parse_kernel_options(self, ctx):
        """Parse yali= from kernel boot parameters."""

        options = get_kernel_option("yali")
        self.__dict__['flags']['live'] = options.has_key("live") or \
                                        os.path.exists("/var/run/pardus/livemedia")
        if options.has_key("system"):
            self.__dict__['flags']['install_type'] = ctx.STEP_BASE
        elif options.has_key("firstboot"):
            self.__dict__['flags']['install_type'] = ctx.STEP_FIRST_BOOT
        elif options.has_key("rescue") :
            self.__dict__['flags']['install_type'] = ctx.STEP_RESCUE
        elif options.has_key("oem") :
            self.__dict__['flags']['install_type'] = ctx.STEP_OEM_INSTALL
        elif options.has_key("live-install") :
            self.__dict__['flags']['install_type'] = ctx.STEP_LIVE
        elif options.has_key("default") :
            self.__dict__['flags']['install_type'] = ctx.STEP_DEFAULT

        if options.has_key("theme") and \
                os.path.exists(os.path.join(ctx.consts.theme_dir, options["theme"])):
            self.__dict__['flags']['theme'] = options["theme"]

        if options.has_key("branding") and \
                os.path.exists(os.path.join(ctx.consts.theme_dir, options["branding"])):
            self.__dict__['flags']['branding'] = options["branding"]

        self.__dict__['flags']['kahya'] = options.has_key("kahyaFile") or \
                                         os.path.exists("/usr/share/yali/data/default.xml")

        if options.has_key("nolvm"):
            self.__dict__['flags']['partitioning_lvm'] = False

        if options.has_key('baseonly') and \
                self.__dict__['flags']['install_type'] == ctx.STEP_BASE:
            self.__dict__['flags']['install_type'] = ctx.STEP_DEFAULT

        if options.has_key("collection"):
            self.__dict__['flags']['collection'] = True
        elif options.has_key("nocollection"):
            self.__dict__['flags']['collection'] = False

        for key in [_key for _key in options.keys() \
            if _key not in ("live", "system", "firstboot", "oem", "firstboot", "rescue", "theme")]:
            self.__dict__[key] = options[key] if options[key] else True
예제 #4
0
def ready():
    from pardus.sysutils import get_kernel_option

    if is_on() == "on" and "off" not in get_kernel_option("xorg"):
        start(boot=True)
예제 #5
0
def ready():
    from pardus.sysutils import get_kernel_option

    if is_on() == "on" and "off" not in get_kernel_option("xorg"):
        start(boot=True)