#! /bin/sh
# Copyright (c) 2001-2002 SuSE Linux AG Nuernberg.  All rights reserved.
#
# Author: Bjrn Jacke <feedback@suse.de>
#
# /etc/init.d/microcode
#
# description: init script for Intel CPU microcode update
### BEGIN INIT INFO
# Provides:          microcode
# Required-Start:    $remote_fs
# Required-Stop:
# Default-Start:     1 2 3 5 S
# Default-Stop:
# X-UnitedLinux-Default-Enabled: yes
# Description:       update the Intel CPU microcode
### END INIT INFO

. /etc/rc.status

rc_reset


# See how we were called.
case "$1" in
  start|b)
	echo -n "Checking/updating CPU microcode"
	/sbin/modprobe -q microcode
	/usr/sbin/microcode_ctl -Qu
	/sbin/modprobe -r -q microcode
	rc_status -v
	;;
  status)
	echo "$0: reading the microcode status is not yet suported"
	;;
  stop)
	;;
  *)
	echo "Usage: $0 start"
	exit 1
esac
rc_exit
