Re: [PATCH] Exclude Xen guests when configuring tboot (#737094)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 20, 2011 at 01:41:12PM -0400, David Cantrell wrote:
> ---
>  iutil.py      |    7 +++++++
>  yuminstall.py |    3 ++-
>  2 files changed, 9 insertions(+), 1 deletions(-)
> 
> diff --git a/iutil.py b/iutil.py
> index ff1ef14..103d36c 100644
> --- a/iutil.py
> +++ b/iutil.py
> @@ -693,6 +693,13 @@ def isEfi():
>  
>      return efi
>  
> +## Check to see if we are in a xen environment.
> +#
> +def inXen():
> +    if os.path.exists("/sys/bus/xen"):
> +        return True
> +    return False
> +
>  ## Generate the /etc/rpm/macros file.
>  # @param root The root of the filesystem to create the files in.
>  def writeRpmPlatform(root="/"):
> diff --git a/yuminstall.py b/yuminstall.py
> index 71f1154..f61ccb6 100644
> --- a/yuminstall.py
> +++ b/yuminstall.py
> @@ -54,6 +54,7 @@ from constants import *
>  from image import *
>  from compssort import *
>  import packages
> +import iutil
>  
>  import gettext
>  _ = lambda x: gettext.ldgettext("anaconda", x)
> @@ -1064,7 +1065,7 @@ class AnacondaYum(YumSorter):
>              self.ts.check()
>              self.ts.order()
>  
> -            self.anaconda.id.bootloader.trusted_boot = self.isPackageInstalled(name="tboot")
> +            self.anaconda.id.bootloader.trusted_boot = self.isPackageInstalled(name="tboot") and not iutil.inXen()
>  
>              if self._run(instLog, cb, intf) == DISPATCH_BACK:
>                  self.tsInfo.curmedia = None

Ack, although I'd probably do the not iutil.inXen() first, assuming that
isPackageInstalled takes longer/more resources. Not that it really
matters much.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)

Attachment: pgpVGMVD4okax.pgp
Description: PGP signature

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux