#!/bin/sh


# Start all init scripts in /etc/init.d
# executing them in numerical order.
#
# Turn off ERROR_NO_HD and ERROR_HD_WRONG_FORMAT
/sbin/set_status_led 3 0
# QNAP_PIC_STATUS_OFF=0x59, QNAP_PIC_POWER_LED_BLINK=0x4C 
/sbin/pic_raw 80
/sbin/pic_raw 89
/sbin/pic_raw 76

for i in /etc/rcK.d/K??* ;do

     # Ignore dangling symlinks (if any).
     #[ ! -f "$i" ] && continue

     case "$i" in
	*.sh)
	    # Source shell script for speed.
	    (
		trap - INT QUIT TSTP
		set stop
		. $i
	    )
	    ;;
	*)
	    # No sh extension, so fork subprocess.
	    $i stop
	    ;;
    esac
done
