[Debian-live-changes] r1330 - in dists/trunk/live-initramfs: doc scripts

Daniel Baumann daniel at alioth.debian.org
Sun May 6 16:37:40 UTC 2007


Author: daniel
Date: 2007-05-06 16:37:39 +0000 (Sun, 06 May 2007)
New Revision: 1330

Modified:
   dists/trunk/live-initramfs/doc/ChangeLog
   dists/trunk/live-initramfs/scripts/live-functions
Log:


Modified: dists/trunk/live-initramfs/doc/ChangeLog
===================================================================
--- dists/trunk/live-initramfs/doc/ChangeLog	2007-05-06 16:35:48 UTC (rev 1329)
+++ dists/trunk/live-initramfs/doc/ChangeLog	2007-05-06 16:37:39 UTC (rev 1330)
@@ -16,6 +16,8 @@
 	* scripts/live:
 	  - Added patch to support encrypted filesystem images.
 	  - Added patch to support multiple filesystem images.
+	* scripts/live-functions:
+	  - Added patch to really export variables from live.vars.
 
 2007-05-06  Daniel Baumann  <daniel at debian.org>
 

Modified: dists/trunk/live-initramfs/scripts/live-functions
===================================================================
--- dists/trunk/live-initramfs/scripts/live-functions	2007-05-06 16:35:48 UTC (rev 1329)
+++ dists/trunk/live-initramfs/scripts/live-functions	2007-05-06 16:37:39 UTC (rev 1330)
@@ -1,5 +1,6 @@
 
 . /scripts/functions
+. /live.vars
 
 # Override this so we don't call PROGRESS
 log_end_msg()
@@ -19,3 +20,16 @@
 	fi
 	_log_msg "Waiting: $@ ..."
 }
+
+really_export ()
+{
+	STRING="${1}"
+	VALUE="$(eval echo -n \${$STRING})"
+
+	if [ -f /live.vars ] && cat /live.vars | grep -sq "export ${STRING}" ; then
+		sed -i -e 's/\('${STRING}'=\).*$/\1'${VALUE}'/' /live.vars
+	else
+		echo "export ${STRING}=\"${VALUE}\"" >> /live.vars
+	fi
+	eval export "${STRING}"="${VALUE}"
+}




More information about the Debian-live-changes mailing list