summaryrefslogtreecommitdiffstats
path: root/mandriva/2010.2/dependencies/resmgr/resmgr.init
blob: 815931a09f378a055f2a7b3723666c83780e4136 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
#
# chkconfig: 2345 15 15
# description: The resource manager is a framework to give user applications
# access to certain device files. The resource manager daemon can be configured
# to give certain users access to different resource classes.
# processname: resmgr
# pidfile: /var/run/resmgr.pid
#
### BEGIN INIT INFO
# Provides: resmgr
# Default-Start: 2 3 4 5
# Short-Description:  A program to allow arbitrary access to device files
# Description: The resource manager is a framework to give user applications \
# access to certain device files. The resource manager daemon can be configured \
# to give certain users access to different resource classes.
### END INIT INFO

# source function library
. /etc/rc.d/init.d/functions

RETVAL=0

RESMGR_BIN=/sbin/resmgrd

case "$1" in
    start)
    	gprintf "Starting resource manager services: "
      daemon $RESMGR_BIN
      RETVAL=$?
      echo
      [ $RETVAL -eq 0 ] && touch /var/lock/subsys/resmgr
      ;;
    stop)
      gprintf "Shutting down resmgr services: "
      killproc resmgr
      RETVAL=$?

	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/resmgr
	;;
  restart|reload)
	$0 stop
	$0 start
	RETVAL=$?
	;;
  status)
	status resmgr
	RETVAL=$?
	;;
  *)
	gprintf "Usage: resmgr {start|stop|status|restart|reload}\n"
	exit 1
esac

exit $RETVAL