Adding live-initramfs 1.87.3-1.
[live-boot-grml.git] / scripts / live-functions
1
2 . /scripts/functions
3 . /live.vars
4
5 # Override this so we don't call PROGRESS
6 log_end_msg()
7 {
8         if [ -x /sbin/usplash_write ]; then
9                 /sbin/usplash_write "SUCCESS ok"
10         fi
11         _log_msg "Done."
12 }
13
14 # Print a message and wait for enter
15 log_wait_msg()
16 {
17         if [ -x /sbin/usplash_write ]; then
18                 /sbin/usplash_write "INPUTENTER $@"
19                 read nunya < /dev/.initramfs/usplash_outfifo
20         fi
21         _log_msg "Waiting: $@ ..."
22 }
23
24 really_export ()
25 {
26     STRING="${1}"
27     VALUE="$(eval echo -n \${$STRING})"
28
29     if [ -f /live.vars ] && cat /live.vars | grep -sq "export ${STRING}" ; then
30         sed -i -e 's/\('${STRING}'=\).*$/\1'${VALUE}'/' /live.vars
31     else
32         echo "export ${STRING}=\"${VALUE}\"" >> /live.vars
33     fi
34     eval export "${STRING}"="${VALUE}"
35 }