From patchwork Thu Sep 1 17:08:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 1119712 Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p81HCLoF007056 for ; Thu, 1 Sep 2011 17:12:42 GMT Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p81H8dWD014622; Thu, 1 Sep 2011 13:08:40 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p81H8cr0026619 for ; Thu, 1 Sep 2011 13:08:38 -0400 Received: from ether.msp.redhat.com (ether.msp.redhat.com [10.15.80.119]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p81H8W5F023703 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Sep 2011 13:08:33 -0400 Received: from ether.msp.redhat.com (localhost.localdomain [127.0.0.1]) by ether.msp.redhat.com (8.14.1/8.14.1) with ESMTP id p81H8Vec018013; Thu, 1 Sep 2011 12:08:31 -0500 Received: (from bmarzins@localhost) by ether.msp.redhat.com (8.14.1/8.14.1/Submit) id p81H8Ule018012; Thu, 1 Sep 2011 12:08:30 -0500 Date: Thu, 1 Sep 2011 12:08:29 -0500 From: Benjamin Marzinski To: christophe.varoqui@opensvc.com, device-mapper development Message-ID: <20110901170829.GI11793@ether.msp.redhat.com> References: <20110901030028.GE11793@ether.msp.redhat.com> <4E5F24DE.50004@suse.de> <1314860671.14056.83.camel@lapoo.opensvc.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1314860671.14056.83.camel@lapoo.opensvc.com> User-Agent: Mutt/1.5.17 (2007-11-01) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-loop: dm-devel@redhat.com Subject: Re: [dm-devel] [PATCH v2] multipath: systemd unit file X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 01 Sep 2011 17:12:42 +0000 (UTC) Here is a systemd unit file for managing multipathd. Signed-off-by: Benjamin Marzinski --- Makefile.inc | 1 + multipathd/Makefile | 3 +++ multipathd/multipathd.service | 14 ++++++++++++++ 3 files changed, 18 insertions(+) -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel Index: multipath-tools-110831/Makefile.inc =================================================================== --- multipath-tools-110831.orig/Makefile.inc +++ multipath-tools-110831/Makefile.inc @@ -31,6 +31,7 @@ man5dir = $(prefix)/usr/share/man/ma rcdir = $(prefix)/etc/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-110831/multipathd/Makefile =================================================================== --- multipath-tools-110831.orig/multipathd/Makefile +++ multipath-tools-110831/multipathd/Makefile @@ -35,6 +35,8 @@ install: $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir) $(INSTALL_PROGRAM) -d $(DESTDIR)$(rcdir) + $(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) @@ -42,6 +44,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-110831/multipathd/multipathd.service =================================================================== --- /dev/null +++ multipath-tools-110831/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=/sbin/multipathd reconfigure +#ExecStop=/path/to/scrip delete-me if not necessary + +[Install] +WantedBy=multi-user.target