From 3d52fbcb4fe70132ade14759d76573b471294800 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 23 Sep 2007 14:46:37 +0200 Subject: Adding live-initramfs 1.87.3-1. --- scripts/live-functions | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'scripts/live-functions') diff --git a/scripts/live-functions b/scripts/live-functions index 60721b4..7100603 100644 --- a/scripts/live-functions +++ b/scripts/live-functions @@ -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}" +} -- cgit v1.2.3