[Lunar-commits] <moonbase> microcode_ctl: add check whether to load microcode

Auke Kok sofar at foo-projects.org
Mon Jun 22 23:37:46 CEST 2009


commit 761fa4714ad4ce4bb9c27c2cc61016d521972c90
Author: Duncan Gibson <duncan.gibson at xs4all.nl>
Date:   Mon Jun 22 23:37:46 2009 +0200

    microcode_ctl: add check whether to load microcode
    
    originally submitted by Paul Bredbury (brebs)
---
 utils/microcode_ctl/init.d/microcode |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/utils/microcode_ctl/init.d/microcode b/utils/microcode_ctl/init.d/microcode
index be1224c..0e41f28 100644
--- a/utils/microcode_ctl/init.d/microcode
+++ b/utils/microcode_ctl/init.d/microcode
@@ -11,6 +11,10 @@ ARGS="-Qu"
 start()
 {
 	echo -n "Loading Intel microcode: "
+
+	# Load microcode kernel module, if needed
+	grep -qo ' microcode$' /proc/misc || modprobe microcode >& /dev/null
+
 	[ -e /dev/cpu/microcode ] &&
 	/usr/sbin/microcode_ctl -Qu &&
 	echo -e $RESULT_OK ||


More information about the Lunar-commits mailing list