]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
Optimize less uname -r calls.
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 27 Sep 2006 13:35:28 +0000 (13:35 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Wed, 27 Sep 2006 13:35:28 +0000 (13:35 +0000)
svn-id: @7819

rc.d/rc.sysinit

index e7ceb2f50910a105c30dcb42a9b877696a1ad4ed..9f302079e80e7ea1201b6a00441dbcd710ba0b33 100755 (executable)
@@ -450,12 +450,14 @@ if ! is_yes "$VSERVER"; then
        # 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:
This page took 0.108138 seconds and 4 git commands to generate.