# Copyright (c) 2015 Qualcomm Technologies, Inc.
# All Rights Reserved.
# Confidential and Proprietary - Qualcomm Technologies, Inc.

# Fastnat module init.d script

export MODULE_BASE=/lib/modules/`uname -r`/
set -e

case "$1" in
  start)
        echo -n "Starting/Loading embms_kernel module: "

        echo "embms:start/load" > /dev/kmsg
        insmod $MODULE_BASE/extra/embms_kernel.ko

        echo "done loading embms_kernel module"
        ;;
  stop)
        echo -n "Unloading embms_kernel.ko "
        rmmod embms_kernel.ko
        echo "done unloading embms_kernel module"
        ;;
  restart)
        $0 stop
        $0 start
        ;;
  *)
        echo "Usage { start | stop | restart}" >&2
        exit 1
        ;;
esac

exit 0
