#!/bin/sh
# $Revision: 1.2 $
# Luis Mondesi < lemsx1@gmail.com >
#
# DESCRIPTION: checks to see if Splashy is running and exits
# USAGE: $0
# LICENSE: GPL

NAME="splashy"
STEPS_DIR=/lib/init/rw/splashy
[ -r "/etc/default/$NAME" ] && . "/etc/default/$NAME"

if pidof $NAME > /dev/null; then
    case ${0} in
        *console-tools*)
            [ ! -d $STEPS_DIR ] && mkdir -p $STEPS_DIR
            touch $STEPS_DIR/splashy-stopped-console-screen 
            ;;
        *kbd*)
            [ ! -d $STEPS_DIR ] && mkdir -p $STEPS_DIR
            touch $STEPS_DIR/splashy-stopped-keymap 
            ;;
    esac
    exit 0
fi

