From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Description of problem: The microcode_ctl script doesnt touches the /var/lock/subsys/microcode_ctl file. And due to this it get executed multiple times (e.g. booting to level 3 and changing to level 5 later manually) Version-Release number of selected component (if applicable): kernel-utils-2.4-9.1.131 How reproducible: Always Steps to Reproduce: 1. boot to level 3 2. login 3. change to level 5 Additional info: fix: --- microcode_ctl.orig 2004-12-02 10:16:44.604289288 +0100 +++ microcode_ctl 2004-12-02 11:16:23.398058313 +0100 @@ -1,71 +1,75 @@ -#!/bin/bash +#! /bin/sh +# +# microcode_ctl Apply cpu microcode update(s) +# # chkconfig: 345 0 99 -# description: script to apply cpu microcode +# description: The script applies cpu microcode update(s) + + +# This is an interactive program, we need the current locale + +# Source function library. +. /etc/init.d/functions + +# Check that we're a priviledged user +[ `id -u` = 0 ] || exit 0 -# vars: -# -# START distribution specific way of kicking programs -# END distribution specific way of checking return status -# PROGRAM the executable to run -# ARGUMENTS the argument we're going to call PROGRAM with DEVICE=/dev/cpu/0/microcode ARGUMENTS=-Qui -RETVAL=0 -PROGRAM=/sbin/microcode_ctl -# Lets just be sure we have a device file... -if [ ! -e $DEVICE ]; -then +# Make sure we have a device file... +if [ ! -e $DEVICE ]; then echo "$0: microcode device $DEVICE doesn't exist?" exit 1 -elif [ ! -c $DEVICE ]; -then +elif [ ! -c $DEVICE ]; then echo "$0: $DEVICE not a character device?" exit 1 fi -if [ ! -e /etc/firmware/microcode.dat ]; -then +if [ ! -e /etc/firmware/microcode.dat ]; then echo "$0: microcode datafile not present (/etc/firmware/microcode.dat)" exit 1 fi +RETVAL=0 -. /etc/init.d/functions - -# perform the update -function start () +start() { - RETVAL=1 # Make sure we are on an intel machine - vendor=`cat /proc/cpuinfo | \ - grep "^vendor_id" | head -1 | \ - awk -F ": " '{ print $2 }'` - if [ "$vendor" != "GenuineIntel" ]; then - return - fi + vendor=`cat /proc/cpuinfo | grep "^vendor_id" | head -1 | awk -F ": " '{ print $2 }'` + + [ "$vendor" != "GenuineIntel" ] && return echo -n "Applying Intel IA32 Microcode update: " - daemon $PROGRAM $ARGUMENTS + daemon /sbin/microcode_ctl $ARGUMENTS RETVAL=$? - - # trap the most common case, errno 19 = no device - if [ $RETVAL -eq 19 ]; - then + + # Trap the most common case, errno 19 = no device + if [ $RETVAL -eq 19 ]; then echo $"$0: kernel does not have microcode device support" + else + echo fi - echo + + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/microcode_ctl + + return $RETVAL } +stop() +{ + rm -f /var/lock/subsys/microcode_ctl +} +# See how we were called. case "$1" in - start|""|reload|force-reload|restart) + start|reload|force-reload|restart) start - exit 0 ;; stop) + stop ;; status) # I wonder when the driver will let us do this... @@ -76,3 +80,5 @@ echo $"Usage: $0 {start|restart}" exit 1 esac + +exit $?
Created attachment 107759 [details] patch.
fixed in cvs. will be in tomorrows rawhide