svn commit: r459084 - in head/sysutils/devcpu-data: . files

Steve Wills swills at FreeBSD.org
Mon Jan 15 17:05:39 UTC 2018


Author: swills
Date: Mon Jan 15 17:05:37 2018
New Revision: 459084
URL: https://svnweb.freebsd.org/changeset/ports/459084

Log:
  sysutils/devcpu-data: fix rc script
  
  PR:		225173
  Reviewed by:	sbruno
  Approved by:	portmgr (implicit)
  MFH:		2018Q1

Modified:
  head/sysutils/devcpu-data/Makefile   (contents, props changed)
  head/sysutils/devcpu-data/files/microcode_update.in

Modified: head/sysutils/devcpu-data/Makefile
==============================================================================
--- head/sysutils/devcpu-data/Makefile	Mon Jan 15 17:02:32 2018	(r459083)
+++ head/sysutils/devcpu-data/Makefile	Mon Jan 15 17:05:37 2018	(r459084)
@@ -3,7 +3,7 @@
 
 PORTNAME=	data
 PORTVERSION=	1.14
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	sysutils
 MASTER_SITES=	https://downloadmirror.intel.com/27431/eng/:intel \
 		LOCAL/sbruno:amd

Modified: head/sysutils/devcpu-data/files/microcode_update.in
==============================================================================
--- head/sysutils/devcpu-data/files/microcode_update.in	Mon Jan 15 17:02:32 2018	(r459083)
+++ head/sysutils/devcpu-data/files/microcode_update.in	Mon Jan 15 17:05:37 2018	(r459084)
@@ -56,11 +56,16 @@ microcode_update_start()
 		    (echo "Microcode Update Failed." && exit 1)
 	done
 	if [ "${microcode_cpus}" = "ALL" ]; then
-			${CMT} -e /dev/cpuctl${i} >/dev/null 2>&1
+                CPUCONTROL_UPDATED=$(cpucontrol -h 2>&1 | grep -q -- -e; echo $?)
+                if [ ${CPUCONTROL_UPDATED} -ne 0 ]; then
+                        echo "Please update your system in order to update CPU microcode."
+                else
+			${CMT} -e /dev/cpuctl0 >/dev/null 2>&1
 			if [ $? -ne 0 ]; then
-				echo "Re-evalutation of CPU flags Failed."
+				echo "Re-evalulation of CPU flags Failed."
 				exit 1
 			fi
+                fi
 	fi
 	echo "Done."
 }


More information about the svn-ports-all mailing list