Check for device node *after* loading the module. (#157672)

This commit is contained in:
Dave Jones 2005-08-17 17:50:45 +00:00
parent 329541c57f
commit 432d05a25e
2 changed files with 18 additions and 15 deletions

View File

@ -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=$?

View File

@ -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 <davej@redhat.com>
- Check for device node *after* loading the module. (#157672)
* Tue Mar 1 2005 Dave Jones <davej@redhat.com>
- Rebuild for gcc4