summaryrefslogtreecommitdiffstats
path: root/bootloader.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2009-04-06 15:54:10 -0400
committerChris Lumens <clumens@redhat.com>2009-04-06 17:03:02 -0400
commit337ec9cccdad8d958d5465eb5fdf433f17851fb8 (patch)
tree4f1cc1e91df7058cb9eb29ae45b2a2ce780e24c7 /bootloader.py
parentb92e8c94631c3cd36769a1265950ade71fce33c8 (diff)
downloadanaconda-337ec9cccdad8d958d5465eb5fdf433f17851fb8.tar.gz
anaconda-337ec9cccdad8d958d5465eb5fdf433f17851fb8.tar.xz
anaconda-337ec9cccdad8d958d5465eb5fdf433f17851fb8.zip
This is the only place isEfiSystemPartition is used, so pull it in.
Diffstat (limited to 'bootloader.py')
-rw-r--r--bootloader.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/bootloader.py b/bootloader.py
index 53dba2b74..17234585d 100644
--- a/bootloader.py
+++ b/bootloader.py
@@ -22,7 +22,7 @@
#
import isys
-import partedUtils
+import parted
import os, sys
import iutil
import string
@@ -39,6 +39,15 @@ log = logging.getLogger("anaconda")
import booty
from booty import bootloaderInfo, checkbootloader
+def isEfiSystemPartition(part):
+ if not part.active:
+ return False
+ return (part.disk.type == "gpt" and
+ part.name == "EFI System Partition" and
+ part.getFlag(parted.PARTITION_BOOT) and
+ part.fileSystem.type in ("fat16", "fat32") and
+ isys.readFSLabel(part.getDeviceNodeName()) != "ANACONDA")
+
def bootloaderSetupChoices(anaconda):
if anaconda.dir == DISPATCH_BACK:
rc = anaconda.intf.messageWindow(_("Warning"),
@@ -63,10 +72,9 @@ def bootloaderSetupChoices(anaconda):
bootPart = None
partitions = anaconda.id.storage.partitions
for part in partitions:
- if part.partedPartition.active and \
- partedUtils.isEfiSystemPartition(part.partedPartition):
- bootPart = part.name
- break
+ if part.partedPartition.active and isEfiSystemPartition(part.partedPartition):
+ bootPart = part.name
+ break
if bootPart:
anaconda.id.bootloader.setDevice(bootPart)