# fbsplash functions.d runit script #

printhlr() {
               printf "${C_OTHER}${PREFIX_REG} ${C_H1}${1}${C_CLEAR} \n"
           }

stat_runit(){
    printf ""
    printhlr "${C_MAIN}${1}${C_CLEAR} "
}


# splash stuff #
if [ -e /etc/conf.d/fbcondecor ]
then
    . /etc/conf.d/fbcondecor
    . /sbin/splash-functions.sh

    case $0 in /etc/runit/1 )
        # Prevent splash destruction
        CONSOLEFONT=""
        # Continue to use a splash daemon started in initcpio
        if /bin/mountpoint -q /run/.splash-cache; then
            /bin/mount --move /run/.splash-cache $spl_cachedir || return
        # Mount a tmpfs
        else
            ( splash_cache_prep ) || return
        fi

        splash_comm_send set message "$SPLASH_BOOT_MESSAGE"

    ;; /etc/runit/3 )
        ( splash_cache_prep ) || return

        splash_comm_send set message "$SPLASH_SHUTDOWN_MESSAGE"
    esac
fi