#!/bin/sh /etc/rc.common

START=19
STOP=100

start() {
  if [ "x$(/bin/config get factory_mode)" = "x1" ]; then
  	return
  fi
  if [ -f /tmp/boot_status ]; then
	/etc/init.d/dil_boot.sh
  fi

  echo "start_service *************"
  /usr/bin/fing_dil 2>/dev/null &	  
}

boot() {
  echo "boot *************"
  /etc/init.d/dilboot
  start
}

stop() {
  echo "stop_service *************"
  kill -17 1
  rm /tmp/fing_dil.log
  return 0
}

restart() {
  echo "Restart_service *************"
  stop
  start
  return 0
}

shutdown() {
  return 0
}

#start_nonopenwrt used for NH ODM to start fing module 
#Just call this procedure to start fing module for NH SKUs
start_nonopenwrt() {
  echo "start fing module for Non openWRT ********* "
  /etc/init.d/dilboot
  /usr/bin/fing_dil --log_debug &	  
}
