summaryrefslogtreecommitdiffstats
path: root/0102-RHBZ-690828-systemd-unit-file.patch
blob: 0c6aaa323b9198fc4102a77ffd52a60e5f0d4ad3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
 Makefile.inc                  |    1 +
 multipathd/Makefile           |    2 ++
 multipathd/multipathd.service |   14 ++++++++++++++
 3 files changed, 17 insertions(+)

Index: multipath-tools/Makefile.inc
===================================================================
--- multipath-tools.orig/Makefile.inc
+++ multipath-tools/Makefile.inc
@@ -31,6 +31,7 @@ man5dir     = $(prefix)/usr/share/man/ma
 rcdir	    = $(prefix)/etc/rc.d/init.d
 syslibdir   = $(prefix)/$(LIB)
 libdir	    = $(prefix)/$(LIB)/multipath
+unitdir     = $(prefix)/lib/systemd/system
 
 GZIP        = /bin/gzip -9 -c
 INSTALL_PROGRAM = install
Index: multipath-tools/multipathd/Makefile
===================================================================
--- multipath-tools.orig/multipathd/Makefile
+++ multipath-tools/multipathd/Makefile
@@ -36,6 +36,8 @@ install:
 	$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)
 	$(INSTALL_PROGRAM) -d $(DESTDIR)$(rcdir)
 	$(INSTALL_PROGRAM) -m 755 multipathd.init.redhat $(DESTDIR)$(rcdir)/$(EXEC)
+	$(INSTALL_PROGRAM) -d $(DESTDIR)$(unitdir)
+	$(INSTALL_PROGRAM) -m 644 $(EXEC).service $(DESTDIR)$(unitdir)
 	$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)
 	$(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
 
@@ -43,6 +45,7 @@ uninstall:
 	rm -f $(DESTDIR)$(bindir)/$(EXEC)
 	rm -f $(DESTDIR)$(rcdir)/$(EXEC)
 	rm -f $(DESTDIR)$(mandir)/$(EXEC).8.gz
+	rm -f $(DESTDIR)$(unitdir)/$(EXEC).service
 
 clean:
 	rm -f core *.o $(EXEC) *.gz
Index: multipath-tools/multipathd/multipathd.service
===================================================================
--- /dev/null
+++ multipath-tools/multipathd/multipathd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Device-Mapper Multipath Device Controller
+Before=iscsi.service iscsid.service
+After=syslog.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/multipathd.pid
+ExecStart=/sbin/multipathd
+ExecReload=/bin/kill -HUP $MAINPID
+#ExecStop=/path/to/scrip delete-me if not necessary
+
+[Install]
+WantedBy=multi-user.target