summaryrefslogtreecommitdiff
path: root/scripts/live-functions
blob: 7100603b474148bfebad4c943167d3323d7c6e92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

. /scripts/functions
. /live.vars

# Override this so we don't call PROGRESS
log_end_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 $@"
		read nunya < /dev/.initramfs/usplash_outfifo
	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}"
}