SVN: rc-scripts/trunk/rc.d/rc.sysinit

glen glen at pld-linux.org
Wed Sep 27 15:35:34 CEST 2006


Author: glen
Date: Wed Sep 27 15:35:28 2006
New Revision: 7819

Modified:
   rc-scripts/trunk/rc.d/rc.sysinit
Log:
Optimize less uname -r calls.

Modified: rc-scripts/trunk/rc.d/rc.sysinit
==============================================================================
--- rc-scripts/trunk/rc.d/rc.sysinit	(original)
+++ rc-scripts/trunk/rc.d/rc.sysinit	Wed Sep 27 15:35:28 2006
@@ -450,12 +450,14 @@
 	# Adjust symlinks as necessary in /boot to keep system services from
 	# spewing messages about mismatched System maps and so on.
 	if ! is_no "$SET_SLINKS"; then
-		if [ -L /boot/System.map -a -r /boot/System.map-`uname -r` ] ; then
-			ln -s -f System.map-`uname -r` /boot/System.map
+		uname_r=$(uname -r)
+		if [ -L /boot/System.map -a -r /boot/System.map-$uname_r ] ; then
+			ln -s -f System.map-$uname_r /boot/System.map
 		fi
-		if [ ! -e /boot/System.map -a -r /boot/System.map-`uname -r` ] ; then
-			ln -s -f System.map-`uname -r` /boot/System.map
+		if [ ! -e /boot/System.map -a -r /boot/System.map-$uname_r ] ; then
+			ln -s -f System.map-$uname_r /boot/System.map
 		fi
+		unset uname_r
 	fi
 
 	# Run depmod if RUN_DEPMOD != "no" and:


More information about the pld-cvs-commit mailing list