# systemd is on redhat, fedora, and suse
%if %{with systemd}
echo '%{_unitdir}/lnet.service' >>lustre.files
+echo '%{_unitdir}/lsvcgss.service' >>lustre.files
%endif
%if "%{_vendor}" == "redhat" || 0%{?openEuler}
%{_bindir}/lustre_req_history
%{_bindir}/remove_changelog
%{_bindir}/remove_updatelog
+%{_bindir}/lsvcgss_sysd
%endif
%{_bindir}/llobdstat
%post
%if %{with systemd}
%systemd_post lnet.service
+%systemd_post lsvcgss.service
%endif
%preun
%if %{with systemd}
%systemd_preun lnet.service
+%systemd_preun lsvcgss.service
%endif
%postun
%if %{with systemd}
%systemd_postun_with_restart lnet.service
+%systemd_postun_with_restart lsvcgss.service
%endif
%clean
if SERVER
sbin_SCRIPTS += $(genscripts) lc_mon lhbadm lc_servip
-bin_SCRIPTS += lustre_req_history remove_changelog remove_updatelog
+bin_SCRIPTS += lustre_req_history remove_changelog remove_updatelog \
+ lsvcgss_sysd
hadir = $(sysconfdir)/ha.d/resource.d
ha_SCRIPTS = Lustre.ha_v2
zfsobj2fid ko2iblnd-probe ksocklnd-config statechange-lustre.sh \
vdev_attach-lustre.sh vdev_remove-lustre.sh vdev_clear-lustre.sh \
bash-completion/lustre bash-completion/lctl bash-completion/lfs \
- remove_changelog remove_updatelog
+ remove_changelog remove_updatelog lsvcgss_sysd
CLEANFILES = $(genscripts)
--- /dev/null
+#!/bin/bash
+#
+# lsvcgss Lustre GSS daemon
+#
+
+# Must be identical to what lsvcgss.service uses
+PIDFILE=/var/run/lsvcgss.pid
+
+# If service is not configured, launch with all mechs
+# -k -- Enable kerberos support
+# -s -- Enable shared key support
+# -z -- Enable gssnull support
+LSVCGSSDARGS="-k -s -z"
+
+# Check for and source configuration file
+[ -f /etc/sysconfig/lsvcgss ] && . /etc/sysconfig/lsvcgss
+
+/usr/sbin/lsvcgssd ${LSVCGSSDARGS}
+RETVAL=$?
+[ $RETVAL -eq 0 ] && echo $(pidof lsvcgssd) > $PIDFILE
+
+exit $RETVAL
if HAVE_SYSTEMD
systemdsystemunit_DATA = lnet.service
+systemdsystemunit_SCRIPTS = lsvcgss.service
endif
-EXTRA_DIST = $(addsuffix .in,$(genunitfiles))
+EXTRA_DIST = $(addsuffix .in,$(genunitfiles)) lsvcgss.service
CLEANFILES = $(genunitfiles)
--- /dev/null
+[Unit]
+Description=Lustre GSS daemon
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/lsvcgss_sysd
+ExecReload=/bin/kill -HUP $MAINPID
+PIDFile=/var/run/lsvcgss.pid
/* remove socket */
unlink(GSS_SOCKET_PATH);
printerr(LL_WARN, "exiting on signal %d\n", signal);
- exit(1);
+ if (signal == SIGTERM)
+ exit(EXIT_SUCCESS);
+ else
+ exit(EXIT_FAILURE);
}
static void