X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-functions;h=964fdf0026cd00706d62a698d03a1fbc22cc5ac7;hb=037b3b3c1fc5a6079b011071b2bb6494249b00fb;hp=60721b4d08bede1ed9fb5fcc8730e38feb7e9c5a;hpb=9fc9e2a1a11b0edada38cb501fefe4f58aa414ac;p=live-boot-grml.git diff --git a/scripts/live-functions b/scripts/live-functions index 60721b4..964fdf0 100644 --- a/scripts/live-functions +++ b/scripts/live-functions @@ -1,21 +1,31 @@ +#!/bin/sh . /scripts/functions +. /live.vars -# Override this so we don't call PROGRESS -log_end_msg() +log_wait_msg () { - if [ -x /sbin/usplash_write ]; then - /sbin/usplash_write "SUCCESS ok" + # Print a message and wait for enter + if [ -x /sbin/usplash_write ] + then + /sbin/usplash_write "INPUTENTER ${@}" + read nunya < /dev/.initramfs/usplash_outfifo fi - _log_msg "Done." + + _log_msg "Waiting: ${@} ..." } -# Print a message and wait for enter -log_wait_msg() +really_export () { - if [ -x /sbin/usplash_write ]; then - /sbin/usplash_write "INPUTENTER $@" - read nunya < /dev/.initramfs/usplash_outfifo + 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 - _log_msg "Waiting: $@ ..." + + eval export "${STRING}"="${VALUE}" }