diff --git a/microcode_ctl.init b/microcode_ctl.init index b490dc7..9787d62 100755 --- a/microcode_ctl.init +++ b/microcode_ctl.init @@ -17,20 +17,6 @@ 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 -fi - . /etc/init.d/functions RETVAL=0 @@ -49,15 +35,29 @@ function start () echo -n $"Applying Intel Microcode update: " + if [ ! -e /etc/firmware/microcode.dat ]; then + echo $"$0: microcode datafile not present (/etc/firmware/microcode.dat)" + exit 1 + fi + /sbin/modprobe microcode lt=0 - while [ ! -c /dev/cpu/microcode ]; do + while [ ! -c $DEVICE ]; do lt=$[lt+1]; [ $lt -gt 5 ] && break; sleep 1; done + # 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 + daemon $PROGRAM $ARGUMENTS RETVAL=$? diff --git a/microcode_ctl.spec b/microcode_ctl.spec index f36c028..8fd2672 100644 --- a/microcode_ctl.spec +++ b/microcode_ctl.spec @@ -82,6 +82,9 @@ family=`cat /proc/cpuinfo | grep "^cpu family" | sort -u | awk -F ": " '{ print exit 0 %changelog +* Wed Aug 17 2005 Dave Jones +- Check for device node *after* loading the module. (#157672) + * Tue Mar 1 2005 Dave Jones - Rebuild for gcc4