From c735b2705c806fc4675a8a6d8e2064388f4f6b35 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Tue, 25 Jan 2005 09:37:26 +0000 Subject: [PATCH] - Drop the node creation/deletion change from previous release. It'll cause grief with selinux, and was a hack to get around a udev shortcoming that should be fixed properly. --- microcode_ctl.init | 21 ++++++++++++++++----- microcode_ctl.spec | 5 +++++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/microcode_ctl.init b/microcode_ctl.init index b1d0a82..b490dc7 100755 --- a/microcode_ctl.init +++ b/microcode_ctl.init @@ -17,6 +17,15 @@ ARGUMENTS=-Qu RETVAL=0 PROGRAM=/sbin/microcode_ctl +# Lets just be sure we have a device file... +if [ ! -e $DEVICE ]; then + echo $"$0: microcode device $DEVICE doesn't exist?" + exit 1 +elif [ ! -c $DEVICE ]; then + echo $"$0: $DEVICE not a character device?" + exit 1 +fi + if [ ! -e /etc/firmware/microcode.dat ]; then echo $"$0: microcode datafile not present (/etc/firmware/microcode.dat)" exit 1 @@ -41,10 +50,13 @@ function start () echo -n $"Applying Intel Microcode update: " /sbin/modprobe microcode - if [ ! -d /dev/cpu ]; then - mkdir /dev/cpu - fi - /bin/mknod /dev/cpu/microcode c 10 184 + + lt=0 + while [ ! -c /dev/cpu/microcode ]; do + lt=$[lt+1]; + [ $lt -gt 5 ] && break; + sleep 1; + done daemon $PROGRAM $ARGUMENTS RETVAL=$? @@ -54,7 +66,6 @@ function start () echo $"$0: kernel does not have microcode device support" fi /sbin/rmmod microcode - rm -f /dev/cpu/microcode echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/microcode_ctl diff --git a/microcode_ctl.spec b/microcode_ctl.spec index 6173d5e..96c1566 100644 --- a/microcode_ctl.spec +++ b/microcode_ctl.spec @@ -82,6 +82,11 @@ family=`cat /proc/cpuinfo | grep "^cpu family" | sort -u | awk -F ": " '{ print exit 0 %changelog +* Tue Jan 25 2005 Dave Jones +- Drop the node creation/deletion change from previous release. + It'll cause grief with selinux, and was a hack to get around + a udev shortcoming that should be fixed properly. + * Fri Jan 21 2005 Dave Jones - Create/remove the /dev/cpu/microcode dev node as needed. - Use correct path again for the microcode.dat.