Adding live-initramfs 1.87.3-1.
[live-boot-grml.git] / scripts / live-functions
index 60721b4..7100603 100644 (file)
@@ -1,5 +1,6 @@
 
 . /scripts/functions
+. /live.vars
 
 # Override this so we don't call PROGRESS
 log_end_msg()
@@ -19,3 +20,16 @@ log_wait_msg()
        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}"
+}