[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/microcode_ctl/devel microcode_ctl.init, 1.9, 1.10 microcode_ctl.spec, 1.21, 1.22



Author: davej

Update of /cvs/dist/rpms/microcode_ctl/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv3387

Modified Files:
	microcode_ctl.init microcode_ctl.spec 
Log Message:
Check for device node *after* loading the module. (#157672)




Index: microcode_ctl.init
===================================================================
RCS file: /cvs/dist/rpms/microcode_ctl/devel/microcode_ctl.init,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- microcode_ctl.init	25 Jan 2005 09:37:26 -0000	1.9
+++ microcode_ctl.init	17 Aug 2005 17:50:45 -0000	1.10
@@ -17,20 +17,6 @@
 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 @@
 
 	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=$?
 


Index: microcode_ctl.spec
===================================================================
RCS file: /cvs/dist/rpms/microcode_ctl/devel/microcode_ctl.spec,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- microcode_ctl.spec	2 Mar 2005 04:06:20 -0000	1.21
+++ microcode_ctl.spec	17 Aug 2005 17:50:45 -0000	1.22
@@ -82,6 +82,9 @@
 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
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]