sys-fs/multipath-tools: replace sed with a patch
authorMike Gilbert <floppym@gentoo.org>
Mon, 12 Sep 2016 21:32:09 +0000 (17:32 -0400)
committerMike Gilbert <floppym@gentoo.org>
Mon, 12 Sep 2016 21:32:09 +0000 (17:32 -0400)
Package-Manager: portage-2.3.0_p24

sys-fs/multipath-tools/files/multipath-tools-0.6.2-ignore-modprobe-failures.patch [new file with mode: 0644]
sys-fs/multipath-tools/multipath-tools-0.6.2-r2.ebuild

diff --git a/sys-fs/multipath-tools/files/multipath-tools-0.6.2-ignore-modprobe-failures.patch b/sys-fs/multipath-tools/files/multipath-tools-0.6.2-ignore-modprobe-failures.patch
new file mode 100644 (file)
index 0000000..cb78589
--- /dev/null
@@ -0,0 +1,25 @@
+From 100588046ad59176b9779c73212aea63be5aace4 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Mon, 12 Sep 2016 17:26:38 -0400
+Subject: [PATCH] multipathd.service: ignore modprobe failures
+
+---
+ multipathd/multipathd.service | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/multipathd/multipathd.service b/multipathd/multipathd.service
+index e3d6f91..d26577f 100644
+--- a/multipathd/multipathd.service
++++ b/multipathd/multipathd.service
+@@ -11,7 +11,7 @@ Conflicts=shutdown.target
+ Type=notify
+ NotifyAccess=main
+ LimitCORE=infinity
+-ExecStartPre=/sbin/modprobe -a scsi_dh_alua scsi_dh_emc scsi_dh_rdac dm-multipath
++ExecStartPre=-/sbin/modprobe -a scsi_dh_alua scsi_dh_emc scsi_dh_rdac dm-multipath
+ ExecStart=/sbin/multipathd -d -s
+ ExecReload=/sbin/multipathd reconfigure
+ 
+-- 
+2.10.0
+
index 4d9b9afbec59fae7bf822aec34c9c482f84521b9..5f0ffa783287f0dcfdc11e5386cf7ad4fbbe8889 100644 (file)
@@ -28,6 +28,7 @@ S="${WORKDIR}/${PN}-${COMMIT_ID:0:7}"
 
 PATCHES=(
        "${FILESDIR}"/${PN}-0.6.2-makefile.patch
+       "${FILESDIR}"/${PN}-0.6.2-ignore-modprobe-failures.patch
 )
 
 get_systemd_pv() {
@@ -56,8 +57,6 @@ src_install() {
        newinitd "${FILESDIR}"/rc-multipathd multipathd
        newinitd "${FILESDIR}"/multipath.rc multipath
 
-       sed -i 's|ExecStartPre=/|ExecStartPre=-/|g' "${D}"/usr/lib/systemd/system/multipathd.service || die
-
        dodoc README ChangeLog
 }