#!/bin/sh
##################################################################################
# CHANGELOG
#===========
# 2010/06/03    CRMS00229700      M. SULYAN
#               Creation
##################################################################################

esc=$'\x1b'
attr="$esc[31m"
default="$esc[0m"*

if [ "$1" != "" ]
then
  # get the reset files to run
  files=$(busybox find /usr/sbin/debug/reset.d -type f -name "*.$1" 2>/dev/null)

  # run them
  for file in $files; do
     if [ -x $file ]; then
        echo "running $file..."
        $file
     fi
  done

  echo "${attr}reset flash done for $1"
fi

exit 0
