#!/bin/sh
#
### BEGIN INIT INFO
# Provides:          fliwi-in-memory-system
# Required-Start:    $all
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Wrapper to execute scripts for Fliwi
# Description:       This is just a wrapper to execute some scripts during boot
#                    and shutdown of the system
### END INIT INFO

NAME="fliwi-in-memory-system"

. /lib/lsb/init-functions

do_start()
{
  echo ""
  fliwi-in-memory-system-execute-on-boot-actions
  return 0
}

do_stop()
{
  echo ""
  fliwi-in-memory-system-execute-on-shutdown-actions
  return 0
}


case "$1" in
  start|restart)
    log_begin_msg "Initializing in-memory-system..."
    do_start
    log_end_msg $?
  ;;

  reload|force-reload|force-stop|status)
    echo "Error: argument '$1' not supported" >&2
    exit 3
  ;;

  stop)
    log_begin_msg "Stopping in-memory-system..."
    do_stop
    log_end_msg $?
  ;;

  *)
    echo "Usage: /etc/init.d/$NAME {start|stop|restart}"
    exit 3
  ;;
esac

exit 0
