X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-functions;h=964fdf0026cd00706d62a698d03a1fbc22cc5ac7;hb=10c81fb1bc8f2326958250e285616db4e9745d84;hp=7100603b474148bfebad4c943167d3323d7c6e92;hpb=3d52fbcb4fe70132ade14759d76573b471294800;p=live-boot-grml.git diff --git a/scripts/live-functions b/scripts/live-functions index 7100603..964fdf0 100644 --- a/scripts/live-functions +++ b/scripts/live-functions @@ -1,35 +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" - fi - _log_msg "Done." -} - -# Print a message and wait for enter -log_wait_msg() -{ - if [ -x /sbin/usplash_write ]; then - /sbin/usplash_write "INPUTENTER $@" + # 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 "Waiting: $@ ..." + + _log_msg "Waiting: ${@} ..." } really_export () { - STRING="${1}" - VALUE="$(eval echo -n \${$STRING})" + 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 - 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}" + eval export "${STRING}"="${VALUE}" }