diff --git a/microcode_ctl.spec b/microcode_ctl.spec index bcc3009..367477b 100644 --- a/microcode_ctl.spec +++ b/microcode_ctl.spec @@ -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 +- Only enable microcode_ctl service if the CPU is capable. + * Wed Jan 12 2005 Dave Jones - Adjust dev node location. (#144963)