Author: glen
Date: Mon Jan 22 19:16:11 2007
New Revision: 8186

Modified:
   rc-scripts/trunk/sysconfig/network-scripts/functions.network
Log:
Cache hostname output to call it less times

Modified: rc-scripts/trunk/sysconfig/network-scripts/functions.network
==============================================================================
--- rc-scripts/trunk/sysconfig/network-scripts/functions.network        
(original)
+++ rc-scripts/trunk/sysconfig/network-scripts/functions.network        Mon Jan 
22 19:16:11 2007
@@ -43,8 +43,9 @@
 
 need_hostname()
 {
-       if [ "`hostname`" = "(none)" -o "`hostname`" = "localhost" -o \
-            "`hostname`" = "localhost.localdomain" ]; then
+       local hostname=$(hostname)
+       if [ "$hostname" = "(none)" -o "$hostname" = "localhost" -o \
+            "$hostname" = "localhost.localdomain" ]; then
                NEEDHOSTNAME=yes
        else
                unset NEEDHOSTNAME
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to