[master f17-branch 2/2] use /sys/class/dmi instead of dmidecode

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

 



From: "Brian C. Lane" <bcl@xxxxxxxxxx>

removes dmidecode binary requirement from specfile and
changes isMactel to read the information directly.
---
 anaconda.spec.in       |    6 ------
 pyanaconda/iutil.py    |    5 ++---
 pyanaconda/platform.py |    1 +
 3 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/anaconda.spec.in b/anaconda.spec.in
index fcd787d..19deec5 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -110,9 +110,6 @@ Requires: dosfstools
 Requires: e2fsprogs >= %{e2fsver}
 Requires: gzip
 Requires: libarchive
-%ifarch %{ix86} x86_64 ia64
-Requires: dmidecode
-%endif
 Requires: python-pyblock >= %{pythonpyblockver}
 Requires: libuser-python
 Requires: newt-python
@@ -176,9 +173,6 @@ Requires: dracut >= 16
 Requires: dracut-network
 Requires: xz
 Requires: pykickstart
-%ifarch %{ix86} x86_64
-Requires: dmidecode
-%endif
 
 %description dracut
 The 'anaconda' dracut module handles installer-specific boot tasks and
diff --git a/pyanaconda/iutil.py b/pyanaconda/iutil.py
index e3b6c84..5c68e02 100644
--- a/pyanaconda/iutil.py
+++ b/pyanaconda/iutil.py
@@ -688,11 +688,10 @@ def isMactel():
 
     if not isX86():
         mactel = False
-    elif not os.path.exists("/usr/sbin/dmidecode"):
+    elif not os.path.isfile(DMI_CHASSIS_VENDOR):
         mactel = False
     else:
-        buf = execWithCapture("/usr/sbin/dmidecode",
-                              ["dmidecode", "-s", "system-manufacturer"])
+        buf = open(DMI_CHASSIS_VENDOR).read()
         if buf.lower().find("apple") != -1:
             mactel = True
         else:
diff --git a/pyanaconda/platform.py b/pyanaconda/platform.py
index 43c0574..e5875e3 100644
--- a/pyanaconda/platform.py
+++ b/pyanaconda/platform.py
@@ -19,6 +19,7 @@
 #
 # Authors: Chris Lumens <clumens@xxxxxxxxxx>
 #
+import os
 import logging
 log = logging.getLogger("anaconda")
 
-- 
1.7.7.6

_______________________________________________
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