#!/bin/sh

# defined here so all init scripts will inherit
# stop openssl from doing undefined instruction check at 
# startup to find ARM core capabilities
# 1 = NEON supported, TICKS not supported
export OPENSSL_armcap=1

# Start all init scripts in /etc/init.d
# executing them in numerical order.
# (skip anything ending with a ~)
#
for i in /etc/init.d/S??*[^~] ;do

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

     echo "--run $i"
     case "$i" in
    *.sh)
        # Source shell script for speed.
        (
        trap - INT QUIT TSTP
        set start
        . $i
        )
        ;;
    *S65wifi | *S67p2p | *S72ozwpan)
        # Execute wireless scripts in parallel (they tend to sleep a lot)
        $i start &
        ;;
    *)
        # No sh extension, so fork subprocess.
        $i start
        ;;
    esac
done

