Check for device node *after* loading the module. (#157672)
This commit is contained in:
parent
329541c57f
commit
432d05a25e
@ -17,20 +17,6 @@ ARGUMENTS=-Qu
|
|||||||
RETVAL=0
|
RETVAL=0
|
||||||
PROGRAM=/sbin/microcode_ctl
|
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
|
. /etc/init.d/functions
|
||||||
|
|
||||||
RETVAL=0
|
RETVAL=0
|
||||||
@ -49,15 +35,29 @@ function start ()
|
|||||||
|
|
||||||
echo -n $"Applying Intel Microcode update: "
|
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
|
/sbin/modprobe microcode
|
||||||
|
|
||||||
lt=0
|
lt=0
|
||||||
while [ ! -c /dev/cpu/microcode ]; do
|
while [ ! -c $DEVICE ]; do
|
||||||
lt=$[lt+1];
|
lt=$[lt+1];
|
||||||
[ $lt -gt 5 ] && break;
|
[ $lt -gt 5 ] && break;
|
||||||
sleep 1;
|
sleep 1;
|
||||||
done
|
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
|
daemon $PROGRAM $ARGUMENTS
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
|
|
||||||
|
@ -82,6 +82,9 @@ family=`cat /proc/cpuinfo | grep "^cpu family" | sort -u | awk -F ": " '{ print
|
|||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%changelog
|
%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>
|
* Tue Mar 1 2005 Dave Jones <davej@redhat.com>
|
||||||
- Rebuild for gcc4
|
- Rebuild for gcc4
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user