rpms/olpc-utils/F-11 olpc-utils-dmidetect.patch, NONE, 1.1 olpc-utils.spec, 1.9, 1.10

Sayamindu Dasgupta sayamind at fedoraproject.org
Fri Aug 7 11:15:49 UTC 2009


Author: sayamind

Update of /cvs/pkgs/rpms/olpc-utils/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22725

Modified Files:
	olpc-utils.spec 
Added Files:
	olpc-utils-dmidetect.patch 
Log Message:
version 1.0.3-2 : Detect XO 1.5 correctly (dlo #9422)



olpc-utils-dmidetect.patch:
 olpc-configure |   19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

--- NEW FILE olpc-utils-dmidetect.patch ---
diff --git a/etc/rc.d/init.d/olpc-configure b/etc/rc.d/init.d/olpc-configure
index e8315fd..a57c4e7 100755
--- a/etc/rc.d/init.d/olpc-configure
+++ b/etc/rc.d/init.d/olpc-configure
@@ -15,14 +15,17 @@ MFG_DATA=/ofw/mfg-data
 XO_VERSION=0
 
 get_xo_version() {
-	# FIXME: is this reliable?
-	[ -e "/ofw/banner-name" ] || return
-
-	banner=$(</ofw/banner-name)
-	if [ "${banner:0:6}" == "OLPC C" ]; then
-		XO_VERSION="1"
-	elif [ "${banner}" == "OLPC XO 1.5" ]; then
-		XO_VERSION="1.5"
+	# This requires an OFW that runs setup-smbios at boot.
+	[ -e "/sys/class/dmi/id/product_name" ] || return
+
+	name=$(</sys/class/dmi/id/product_name)
+	version=$(</sys/class/dmi/id/product_version)
+	if [ "${name}" == "XO" ]; then
+		if [ "${version}" == "1" ]; then
+			XO_VERSION="1"
+		elif [ "${version}" == "1.5" ]; then
+			XO_VERSION="1.5"
+		fi
 	fi
 }
 


Index: olpc-utils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/olpc-utils/F-11/olpc-utils.spec,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- olpc-utils.spec	6 Jul 2009 13:59:38 -0000	1.9
+++ olpc-utils.spec	7 Aug 2009 11:15:49 -0000	1.10
@@ -1,6 +1,6 @@
 Name:       olpc-utils
 Version:    1.0.3
-Release:    1%{?dist}
+Release:    2%{?dist}
 Summary:    OLPC utilities
 URL:        http://dev.laptop.org/git?p=projects/olpc-utils;a=summary
 Group:      System Environment/Base
@@ -8,6 +8,8 @@ License:    GPLv2+
 Source0:    %{name}-%{version}.tar.bz2
 BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+Patch1: olpc-utils-dmidetect.patch
+
 # for olpc-dm
 BuildRequires:  ConsoleKit-devel
 Requires:       /usr/bin/xauth
@@ -30,6 +32,8 @@ becoming root, and cleaning the datastor
 %prep
 %setup -q
 
+%patch1 -p1
+
 
 %build
 make -f Makefile.build %{?_smp_mflags} CFLAGS="%{optflags}"
@@ -81,6 +85,9 @@ rm -rf %{buildroot}
 %config(noreplace) %{_sysconfdir}/ConsoleKit/run-session.d/pam-console-compat.ck
 
 %changelog
+* Fri Aug 10 2009 Sayamindu Dasgupta <sayamindu at laptop.org> 1.0.3-2
+- Detect XO 1.5 correctly (dlo #9422)
+
 * Mon Jul  6 2009 Daniel Drake <dsd at laptop.org> 1.0.3-1
 - Bug fix release
 




More information about the scm-commits mailing list