#!/bin/sh

display_init() {
    update_screen_info
    export EI_ROW=38
    export width=49
    [ "$SCREEN_X_RES" == "600" ] || export EI_ROW=28
    [ "$SCREEN_X_RES" == "600" ] || export width=65
}

display() {
    display_init
    [ -n "$2" ] && export EI_ROW=$(($EI_ROW-1))
    puts "$(printf "%${width}s" ' ' )"
    puts "$(printf "%-${width}s" "$1" || dd bs=1 count=${width})"
    [ -n "$2" ] && puts "$(printf "%-${width}s" "$2" || dd bs=1 count=${width})"
}

export PATH=$PATH:/usr/sbin

_FUNCTIONS=/etc/rc.d/functions
[ -f ${_FUNCTIONS} ] && . ${_FUNCTIONS}

_EIPUTS=/usr/sbin/eiputs
[ -f ${_EIPUTS} ] && . ${_EIPUTS}

puts_init

( [ "$1" -gt "0" ] && sleep $1; display "$2" "$3" ) &

exit 0
