def getPlatform(anaconda):
    """Check the architecture of the system and return an instance of a
       Platform subclass to match.  If the architecture could not be determined,
       raise an exception."""
    if iutil.isAlpha():
        return Alpha(anaconda)
    elif iutil.isIA64():
        return IA64(anaconda)
    elif iutil.isPPC():
        ppcMachine = iutil.getPPCMachine()

        if (ppcMachine == "PMac" and iutil.getPPCMacGen() == "NewWorld"):
            return NewWorldPPC(anaconda)
        elif ppcMachine in ["iSeries", "pSeries"]:
            return IPSeriesPPC(anaconda)
        elif ppcMachine == "PS3":
            return PS3(anaconda)
        else:
            raise SystemError, "Unsupported PPC machine type"
    elif iutil.isS390():
        return S390(anaconda)
    elif iutil.isSparc():
        return Sparc(anaconda)
    elif iutil.isX86():
        return X86(anaconda)
    else:
        raise SystemError, "Could not determine system architecture."
def getPlatform(anaconda):
    """Check the architecture of the system and return an instance of a
       Platform subclass to match.  If the architecture could not be determined,
       raise an exception."""
    if iutil.isAlpha():
        return Alpha(anaconda)
    elif iutil.isIA64():
        return IA64(anaconda)
    elif iutil.isPPC():
        ppcMachine = iutil.getPPCMachine()

        if (ppcMachine == "PMac" and iutil.getPPCMacGen() == "NewWorld"):
            return NewWorldPPC(anaconda)
        elif ppcMachine in ["iSeries", "pSeries"]:
            return IPSeriesPPC(anaconda)
        elif ppcMachine == "PS3":
            return PS3(anaconda)
        else:
            raise SystemError, "Unsupported PPC machine type"
    elif iutil.isS390():
        return S390(anaconda)
    elif iutil.isSparc():
        return Sparc(anaconda)
    elif iutil.isX86():
        return X86(anaconda)
    else:
        raise SystemError, "Could not determine system architecture."
示例#3
0
def getBootloader(anaconda):
    """Get the bootloader info object for your architecture"""
    if iutil.isX86():
        import x86

        return x86.x86BootloaderInfo(anaconda)
    elif iutil.isIA64():
        import ia64

        return ia64.ia64BootloaderInfo(anaconda)
    elif iutil.isS390():
        import s390

        return s390.s390BootloaderInfo(anaconda)
    elif iutil.isAlpha():
        import alpha

        return alpha.alphaBootloaderInfo(anaconda)
    elif iutil.isPPC():
        import ppc

        return ppc.ppcBootloaderInfo(anaconda)
    elif iutil.isSparc():
        import sparc

        return sparc.sparcBootloaderInfo(anaconda)
    else:
        return bootloaderInfo(anaconda)
示例#4
0
def getBootloader(anaconda):
    """Get the bootloader info object for your architecture"""
    if iutil.isX86():
        import x86
        return x86.x86BootloaderInfo(anaconda)
    elif iutil.isIA64():
        import ia64
        return ia64.ia64BootloaderInfo(anaconda)
    elif iutil.isS390():
        import s390
        return s390.s390BootloaderInfo(anaconda)
    elif iutil.isAlpha():
        import alpha
        return alpha.alphaBootloaderInfo(anaconda)
    elif iutil.isPPC():
        import ppc
        return ppc.ppcBootloaderInfo(anaconda)
    elif iutil.isSparc():
        import sparc
        return sparc.sparcBootloaderInfo(anaconda)
    else:
        return bootloaderInfo(anaconda)