Whamcloud - gitweb
LU-6020 gss: add lsvcgssd init.d wrapper 46/15546/8
authorAndrew Perepechko <andrew.perepechko@seagate.com>
Fri, 10 Jul 2015 20:31:13 +0000 (23:31 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 9 Feb 2016 19:02:49 +0000 (19:02 +0000)
This patch adds a trivial init.d wrapper for
lsvcgssd so that it can be started automatically.

Xyratex-bug-id: SNT-15

Change-Id: Ida6770a80ee1dd04025d6eabf4202a61179dc9be
Signed-off-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Reviewed-on: http://review.whamcloud.com/15546
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Jeremy Filizetti <jeremy.filizetti@gmail.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre.spec.in
lustre/scripts/Makefile.am
lustre/scripts/lsvcgss [new file with mode: 0755]

index ff1caf6..91f6d26 100644 (file)
@@ -376,6 +376,7 @@ echo '%{_sysconfdir}/sysconfig/lustre' >>lustre.files
 echo '%{_sysconfdir}/init.d/lustre' >>lustre.files
 %endif
 echo '%{_sysconfdir}/init.d/lnet' >>lustre.files
+echo '%{_sysconfdir}/init.d/lsvcgss' >>lustre.files
 %endif
 
 # Create the pristine source directory.
index 4f8f253..76b4686 100644 (file)
@@ -43,7 +43,7 @@ sbin_SCRIPTS = lustre_rmmod ko2iblnd-probe
 
 if RHEL
 initdir = $(sysconfdir)/init.d
-init_SCRIPTS  = lnet
+init_SCRIPTS  = lnet lsvcgss
 if SERVER
 init_SCRIPTS += lustre
 endif
@@ -75,7 +75,7 @@ EXTRA_DIST = license-status version_tag.pl version_tag-git.pl \
             version_tag-none.pl lustre_rmmod ldev lc_mon lhbadm \
             lc_servip lustre_routes_config lustre_routes_conversion \
             $(addsuffix .in,$(genscripts)) lfs_migrate lustre_req_history \
-            lustre lnet lc_common haconfig Lustre.ha_v2 dkms.mkconf \
+            lustre lnet lsvcgss lc_common haconfig Lustre.ha_v2 dkms.mkconf \
             zfsobj2fid ko2iblnd-probe
 
 CLEANFILES = $(genscripts)
diff --git a/lustre/scripts/lsvcgss b/lustre/scripts/lsvcgss
new file mode 100755 (executable)
index 0000000..87c3b80
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/bash
+#
+# lsvcgss      Lustre GSS daemon
+#
+# chkconfig: 2345 10 90
+# description: start and stop the lsvcgssd daemon
+#
+
+# Source function library.
+. /etc/init.d/functions
+
+LOCKFILE="/var/lock/subsys/lsvcgssd"
+
+# See how we were called.
+case "$1" in
+       start)
+               echo $"Starting lsvcgssd"
+               /usr/sbin/lsvcgssd
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch $LOCKFILE
+               ;;
+       stop)
+               echo $"Stopping lsvcgssd"
+               killall lsvcgssd
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && rm -f $LOCKFILE
+               ;;
+       status)
+               status lsvcgssd
+               RETVAL=$?
+               ;;
+       restart|reload)
+               $0 stop
+               $0 start
+               RETVAL=$?
+               ;;
+       *)
+               echo $"Usage: $0 {start|stop|restart|reload|status}"
+               exit 1
+esac
+
+exit $RETVAL