only enable microcode_ctl if the cpu is capable.
This commit is contained in:
		
							parent
							
								
									3d4da5f561
								
							
						
					
					
						commit
						c21011d49e
					
				| @ -57,12 +57,24 @@ chmod -R a-s %{buildroot} | ||||
| /sbin/microcode_ctl | ||||
| %attr(0644,root,root) %{_mandir}/*/* | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| %preun | ||||
| if [ "$1" = "0" ] ; then | ||||
|  /sbin/chkconfig --del microcode_ctl | ||||
| 	/sbin/chkconfig --del microcode_ctl | ||||
| fi | ||||
| 
 | ||||
| %post | ||||
| # Only enable on Intel machines. | ||||
| vendor=`cat /proc/cpuinfo | grep "^vendor_id" | sort -u | awk -F ": " '{ print $2 }'` | ||||
| if [ "$vendor" != "GenuineIntel" ]; then | ||||
| 	exit 0; | ||||
| fi | ||||
| # Microcode wasn't available until 686's. | ||||
| family=`cat /proc/cpuinfo | grep "^cpu family" | sort -u | awk -F ": " '{ print $2 }'` | ||||
| if [ $family -lt 6 ]; then | ||||
| 	exit 0; | ||||
| fi | ||||
| /sbin/chkconfig --add microcode_ctl | ||||
| 
 | ||||
| %triggerpostun -- kernel-utils | ||||
| @ -70,6 +82,9 @@ fi | ||||
| exit 0 | ||||
| 
 | ||||
| %changelog | ||||
| * Fri Jan 14 2005 Dave Jones <davej@redhat.com> | ||||
| - Only enable microcode_ctl service if the CPU is capable. | ||||
| 
 | ||||
| * Wed Jan 12 2005 Dave Jones <davej@redhat.com> | ||||
| - Adjust dev node location. (#144963) | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user