Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > f673a642e1c7f9d98c44fe4501456869 > files > 2

microcode_ctl-1.06-4mdk.i586.rpm

#! /bin/sh
#
# microcode      Update the Intel CPU microcode.
#
# chkconfig: 2345 95 95
# description: microcode_ctl is a programm that uses the kernel
#              to update the microcode of Intel P6 familly (ie
#              PPro, PII, Celeron, PIII, Celeron2.
# processname: microcode_ctl
# config: /etc/microcode_ctl.dat

# source function library
. /etc/rc.d/init.d/functions

RETVAL=0

case "$1" in
  start)
	gprintf "Applying Intel P6 Microcode update... "
	modprobe microcode
        /usr/sbin/microcode_ctl -Qui
	RETVAL=$?
        if [ $RETVAL -eq 0 ]; then
           action "" /bin/true
           touch /var/lock/subsys/microcode_ctl
       else
           action "" /bin/false
       fi
	;;
  stop)
       rm -f /var/lock/subsys/microcode_ctl
	;;
  reload|restart)
	;;
  status)
        ;;
  *)
	gprintf "Usage: microcode start|stop}\n"
	exit 1
esac

exit $RETVAL