summaryrefslogtreecommitdiff
path: root/scripts/casper-functions
blob: 2603eba38261f98d351aeb637735f251ddbb680e (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

. /scripts/functions
. /casper.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."
}

really_export ()
{
    STRING="${1}"
    VALUE="$(eval echo -n \${$STRING})"

    if [ -f /casper.vars ] && cat /casper.vars | grep -sq "export ${STRING}" ; then
        sed -i -e 's/\('${STRING}'=\).*$/\1'${VALUE}'/' /casper.vars
    else
        echo "export ${STRING}=\"${VALUE}\"" >> /casper.vars
    fi
    eval export "${STRING}"="${VALUE}"
}