Whamcloud - gitweb
LU-8384 scripts: Add scripts to systemd for EL7
[fs/lustre-release.git] / lustre / scripts / systemd / lustre.service.in
diff --git a/lustre/scripts/systemd/lustre.service.in b/lustre/scripts/systemd/lustre.service.in
new file mode 100644 (file)
index 0000000..26d907d
--- /dev/null
@@ -0,0 +1,16 @@
+[Unit]
+Description=Lustre shutdown
+After=network.target network-online.target lnet.service
+DefaultDependencies=false
+Conflicts=umount.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=true
+ExecStart=/bin/true
+ExecStop=@bindir@/umount -a -t lustre
+ExecStop=@sbindir@/lustre_rmmod
+
+[Install]
+WantedBy=sysinit.target
+WantedBy=final.target