#!/bin/sh

source /usr/bin/qiba-leds.sh

start()
{
    # Add your custom board initialization here.
    # This will be called early on the boot process, don't count on things like
    # network to be operational.

    /usr/bin/aplay -Dplug:master1 -f S8 /dev/zero >/dev/null 2>&1 &

    
    # Don't trust the PATH, it is not guaranteed to be set at this point.
    echo 17 > /sys/class/gpio/export
    echo out > /sys/class/gpio/gpio17/direction
    echo 1 > /sys/class/gpio/gpio17/value
	
		#unified for all board and images
	if [ -d $LED1_GREEN ]; then
		#GRN - solid - System up and running
		led1_set_green
	else
		#RED - solid - System up and running
		led1_set_red
	fi
	
}

stop()
{
    # Add your custom board shutdown commands here.
    # This is called shortly before the system shuts down
    echo
}


case "$1" in

"start")
    start
    ;;
    
"stop")
    stop
    ;;
    
esac
