~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
cvs/emstar/fusd/initscripts/fusdd-debian


  1 #! /bin/sh
  2 #
  3 # skeleton      example file to build /etc/init.d/ scripts.
  4 #               This file should be used to construct scripts for /etc/init.d.
  5 #
  6 #               Written by Miquel van Smoorenburg <miquels@cistron.nl>.
  7 #               Modified for Debian GNU/Linux
  8 #               by Ian Murdock <imurdock@gnu.ai.mit.edu>.
  9 #
 10 # Created by :       eugene@lcs.mit.edu
 11 # Last Modified by:  $Author: mlukac $
 12 # Version:           $Id: fusdd-debian,v 1.5 2005-07-01 18:21:57 mlukac Exp $
 13 #
 14 
 15 # eugene: you need to run update-rc.d <script-name> to insure that fusdd
 16 # will run at boot time.  Note that this script SHOULD work on all
 17 # debian-based platforms including the ipaq-sa (Familiar) -- tested only on
 18 # ipaq
 19 
 20 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 21 
 22 # eugene: change the following to match the location of fusdd
 23 FUSDD_PATH=/usr/sbin
 24 NAME=fusdd
 25 DAEMON=$FUSDD_PATH/$NAME
 26 DESC="FUSD daemon"
 27 
 28 if [ -f $DAEMON  ] ; then
 29 
 30 set -e
 31 
 32 case "$1" in
 33   start)
 34         echo -n "Starting $DESC: "
 35         start-stop-daemon --start --quiet --exec $DAEMON
 36         /sbin/modprobe kfusd &> /dev/null # load the kfusd kernel driver
 37         echo "$NAME."
 38         ;;
 39   stop)
 40         echo -n "Stopping $DESC: "
 41         start-stop-daemon --stop --quiet --pidfile --exec $DAEMON
 42         killall $NAME # just to make sure
 43         /sbin/rmmod kfusd
 44         echo "$NAME."
 45         ;;
 46   #reload)
 47         #
 48         #       If the daemon can reload its config files on the fly
 49         #       for example by sending it SIGHUP, do it here.
 50         #
 51         #       If the daemon responds to changes in its config file
 52         #       directly anyway, make this a do-nothing entry.
 53         #
 54         # echo "Reloading $DESC configuration files."
 55         # start-stop-daemon --stop --signal 1 --quiet --pidfile \
 56         #       /var/run/$NAME.pid --exec $DAEMON
 57   #;;
 58   restart|force-reload)
 59         #
 60         #       If the "reload" option is implemented, move the "force-reload"
 61         #       option to the "reload" entry above. If not, "force-reload" is
 62         #       just the same as "restart".
 63         #
 64         echo -n "Restarting $DESC: "
 65         start-stop-daemon --stop --quiet --exec $DAEMON
 66         sleep 1
 67         start-stop-daemon --start --quiet --exec $DAEMON
 68         echo "$NAME."
 69         ;;
 70   *)
 71         N=/etc/init.d/$NAME
 72         # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
 73         echo "Usage: $N {start|stop|restart|force-reload}" >&2
 74         exit 1
 75         ;;
 76 esac
 77 
 78 else
 79         echo "Cannot find $DAEMON.";
 80         exit 1;
 81 fi
 82 
 83 
 84 exit 0

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.