From 4bfb99a83b632b0ad26df4544e556250683b4d4d Mon Sep 17 00:00:00 2001 From: Andrew Perepechko Date: Fri, 10 Jul 2015 23:31:13 +0300 Subject: [PATCH] LU-6020 gss: add lsvcgssd init.d wrapper 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 Reviewed-on: http://review.whamcloud.com/15546 Reviewed-by: John L. Hammond Reviewed-by: Jeremy Filizetti Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre.spec.in | 1 + lustre/scripts/Makefile.am | 4 ++-- lustre/scripts/lsvcgss | 42 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100755 lustre/scripts/lsvcgss diff --git a/lustre.spec.in b/lustre.spec.in index ff1caf6..91f6d26 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -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. diff --git a/lustre/scripts/Makefile.am b/lustre/scripts/Makefile.am index 4f8f253..76b4686 100644 --- a/lustre/scripts/Makefile.am +++ b/lustre/scripts/Makefile.am @@ -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 index 0000000..87c3b80 --- /dev/null +++ b/lustre/scripts/lsvcgss @@ -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 -- 1.8.3.1