#!/bin/sh -e

if [ "$1" = "configure" ]; then
    if [ -z "$2" ]; then
        if [ -x /usr/sbin/services.sh ]; then
	    if [ -e /etc/fastservices ]; then
		grep --silent bpw /etc/fastservices || \
		    echo bpw >> /etc/fastservices
	    else
                echo bpw >> /etc/fastservices
	    fi
        fi
	update-rc.d bpw defaults > /dev/null
    fi
fi

invoke-rc.d bpw start
