[Lunar-commits] r27012 - lunar/trunk/var/lib/lunar/functions

Moritz Heiber moe at lunar-linux.org
Thu Feb 28 23:19:01 CET 2008


Author: moe
Date: 2008-02-28 23:19:01 +0100 (Thu, 28 Feb 2008)
New Revision: 27012

Modified:
   lunar/trunk/var/lib/lunar/functions/misc.lunar
Log:
Trying to adhere to Chad's suggestion. Its better. If there's anyone able
to accomplish the same with sed (0 out of 4 tries yet) please feel free
to enlighten me.



Modified: lunar/trunk/var/lib/lunar/functions/misc.lunar
===================================================================
--- lunar/trunk/var/lib/lunar/functions/misc.lunar	2008-02-28 17:25:04 UTC (rev 27011)
+++ lunar/trunk/var/lib/lunar/functions/misc.lunar	2008-02-28 22:19:01 UTC (rev 27012)
@@ -46,17 +46,20 @@
 
 ld_remove() {
 	debug_msg "ld_remove ($@)"
-	TMP_LD_CONF=$(temp_create "ldsoconf")
 
 	if [ ! -z "$1" ] && [ -d "$1" ] ; then
 		if [ `grep -s $1 /etc/ld.so.conf` ] ; then
+
+			TMP_LD_CONF=$(temp_create "ldsoconf")
 			verbose_msg "Removing $1 from ld.so.conf"
+
 			grep -v $1 /etc/ld.so.conf > $TMP_LD_CONF
 			cat $TMP_LD_CONF > /etc/ld.so.conf
 			ldconfig
+
+			temp_destroy $TMP_LD_CONF
 		fi
 	fi
-	temp_destroy $TMP_LD_CONF
 }
 
 # function : directories



More information about the Lunar-commits mailing list