Whamcloud - gitweb
LU-11696 utils: "lfs getsom" returns "24" to userspace
[fs/lustre-release.git] / lustre / scripts / lsvcgss
1 #!/bin/bash
2 #
3 # lsvcgss      Lustre GSS daemon
4 #
5 # chkconfig: 2345 10 90
6 # description: start and stop the lsvcgssd daemon
7 #
8
9 # Source function library.
10 . /etc/init.d/functions
11
12 LOCKFILE="/var/lock/subsys/lsvcgssd"
13 # -k -- Enable kerberos support
14 # -s -- Enable shared key support
15 LSVCGSSDARGS="-k -s"
16
17 # Check for and source configuration file
18 [ -f /etc/sysconfig/lsvcgss ] && . /etc/sysconfig/lsvcgss
19
20 # See how we were called.
21 case "$1" in
22         start)
23                 echo $"Starting lsvcgssd"
24                 /usr/sbin/lsvcgssd ${LSVCGSSDARGS}
25                 RETVAL=$?
26                 [ $RETVAL -eq 0 ] && touch $LOCKFILE
27                 ;;
28         stop)
29                 echo $"Stopping lsvcgssd"
30                 killall lsvcgssd
31                 RETVAL=$?
32                 [ $RETVAL -eq 0 ] && rm -f $LOCKFILE
33                 ;;
34         status)
35                 status lsvcgssd
36                 RETVAL=$?
37                 ;;
38         restart|reload)
39                 $0 stop
40                 $0 start
41                 RETVAL=$?
42                 ;;
43         *)
44                 echo $"Usage: $0 {start|stop|restart|reload|status}"
45                 exit 1
46 esac
47
48 exit $RETVAL