summaryrefslogtreecommitdiffstats
path: root/iutil.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2006-06-09 19:10:33 +0000
committerJeremy Katz <katzj@redhat.com>2006-06-09 19:10:33 +0000
commite22389a8eb7fbfbe81bac961bc86775ff7347205 (patch)
tree2a66eee4b2bf88fddba13c3686e3624d9410932a /iutil.py
parentc9285b266a5f47075d08bbb0c4468d9055fffd52 (diff)
downloadanaconda-e22389a8eb7fbfbe81bac961bc86775ff7347205.tar.gz
anaconda-e22389a8eb7fbfbe81bac961bc86775ff7347205.tar.xz
anaconda-e22389a8eb7fbfbe81bac961bc86775ff7347205.zip
2006-06-09 Jeremy Katz <katzj@redhat.com>
* iutil.py (isMactel): Add a way to check if a box is a mactel
Diffstat (limited to 'iutil.py')
-rw-r--r--iutil.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/iutil.py b/iutil.py
index 69bbd8c8b..fbc98ec2a 100644
--- a/iutil.py
+++ b/iutil.py
@@ -436,6 +436,18 @@ def getPPCMacBook():
return 1
return 0
+# return True if this is one of the Intel-based Apple Macs
+def isMactel():
+ if rhpl.getArch() not in ("x86_64", "i386"):
+ return False
+ if not os.path.exists("/usr/sbin/dmidecode"):
+ return False
+ buf = execWithCapture("/usr/sbin/dmidecode",
+ ["dmidecode", "-s", "system-manufacturer"])
+ if buf.lower().find("apple") != -1:
+ return True
+ return False
+
def hasNX():
"""Convenience function to see if a machine supports the nx bit. We want
to install an smp kernel if NX is present since NX requires PAE (#173245)"""