25 lines
709 B
Text
25 lines
709 B
Text
#!/sbin/runscript
|
|
# Copyright 1999-2008 Gentoo Foundation
|
|
# Distributed under the terms of the GNU General Public License, v2 or later
|
|
# $Header: /var/cvsroot/gentoo-x86/sys-apps/microcode-ctl/files/microcode_ctl.rc,v 1.5 2008/05/05 04:05:58 vapier Exp $
|
|
|
|
depend() {
|
|
need localmount
|
|
}
|
|
|
|
start() {
|
|
local ret
|
|
|
|
# Make sure the kernel supports the microcode device ...
|
|
# if it doesnt, try to modprobe the kernel module
|
|
grep -qs ' microcode$' /proc/misc || modprobe -q microcode
|
|
|
|
ebegin "Updating microcode"
|
|
microcode_ctl -qu -d ${MICROCODE_DEV}
|
|
ret=$?
|
|
eend ${ret} "Failed to update microcode via '${MICROCODE_DEV}'"
|
|
|
|
[ "${MICROCODE_UNLOAD}" = "yes" ] && rmmod microcode >/dev/null 2>&1
|
|
|
|
return ${ret}
|
|
}
|