initscript tweaks
This commit is contained in:
parent
8d588a81ec
commit
90db39236d
@ -16,6 +16,7 @@ DEVICE=/dev/cpu/microcode
|
|||||||
ARGUMENTS=-Qu
|
ARGUMENTS=-Qu
|
||||||
RETVAL=0
|
RETVAL=0
|
||||||
PROGRAM=/sbin/microcode_ctl
|
PROGRAM=/sbin/microcode_ctl
|
||||||
|
DATAFILE=/etc/firmware/microcode.dat
|
||||||
|
|
||||||
. /etc/init.d/functions
|
. /etc/init.d/functions
|
||||||
|
|
||||||
@ -25,18 +26,18 @@ RETVAL=0
|
|||||||
function start ()
|
function start ()
|
||||||
{
|
{
|
||||||
RETVAL=1
|
RETVAL=1
|
||||||
# Make sure we are on an intel machine
|
# Make sure we are on an Intel machine
|
||||||
vendor=`cat /proc/cpuinfo | grep "^vendor_id" | sort -u | awk -F ": " '{ print $2 }'`
|
vendor=`grep "^vendor_id" /proc/cpuinfo | head -n1 | awk -F ": " '{ print $2 }'`
|
||||||
[ "$vendor" != "GenuineIntel" ] && return
|
[ "$vendor" != "GenuineIntel" ] && return
|
||||||
|
|
||||||
# Microcode wasn't available until 686's.
|
# Microcode wasn't available until 686's.
|
||||||
family=`cat /proc/cpuinfo | grep "^cpu family" | sort -u | awk -F ": " '{ print $2 }'`
|
family=`grep "^cpu family" /proc/cpuinfo | head -n1 | awk -F ": " '{ print $2 }'`
|
||||||
[ $family -lt 6 ] && return
|
[ $family -lt 6 ] && return
|
||||||
|
|
||||||
echo -n $"Applying Intel Microcode update: "
|
echo -n $"Applying Intel CPU microcode update: "
|
||||||
|
|
||||||
if [ ! -e /etc/firmware/microcode.dat ]; then
|
if [ ! -e $DATAFILE ]; then
|
||||||
echo $"$0: microcode datafile not present (/etc/firmware/microcode.dat)"
|
echo $"$0: CPU microcode data file not present ($DATAFILE)"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -63,7 +64,7 @@ function start ()
|
|||||||
|
|
||||||
# trap the most common case, errno 19 = no device
|
# trap the most common case, errno 19 = no device
|
||||||
if [ $RETVAL -eq 19 ]; then
|
if [ $RETVAL -eq 19 ]; then
|
||||||
echo $"$0: kernel does not have microcode device support"
|
echo $"$0: kernel does not have CPU microcode device support"
|
||||||
fi
|
fi
|
||||||
/sbin/rmmod microcode
|
/sbin/rmmod microcode
|
||||||
echo
|
echo
|
||||||
|
@ -82,6 +82,9 @@ family=`cat /proc/cpuinfo | grep "^cpu family" | sort -u | awk -F ": " '{ print
|
|||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 14 2005 Dave Jones <davej@redhat.com>
|
||||||
|
- initscript tweaks.
|
||||||
|
|
||||||
* Tue Sep 13 2005 Dave Jones <davej@redhat.com>
|
* Tue Sep 13 2005 Dave Jones <davej@redhat.com>
|
||||||
- Update to upstream 1.12
|
- Update to upstream 1.12
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user