Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > by-pkgid > 049a81cff9fc5cf8393c77c8f4be351c > files > 1

microcode_ctl-1.12-1mdk.src.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)
	echo -n "Applying Intel P6 Microcode update... "
	modprobe microcode
        /usr/sbin/microcode_ctl -Qu
	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)
        ;;
  *)
	echo "Usage: microcode {start|stop}"
	exit 1
esac

exit $RETVAL