summaryrefslogtreecommitdiff
path: root/community/multipath-tools
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-08-19 00:04:07 +0000
committerroot <root@rshg054.dnsready.net>2012-08-19 00:04:07 +0000
commitc512f9eb344575ac6bce0b13729c05e1760cd094 (patch)
tree8d60a9bd559a941bba52a67170900c159d2024eb /community/multipath-tools
parent948da5eabcbf8d74270e661d0730ba1c203913f5 (diff)
Sun Aug 19 00:04:07 UTC 2012
Diffstat (limited to 'community/multipath-tools')
-rw-r--r--community/multipath-tools/PKGBUILD16
-rw-r--r--community/multipath-tools/rc.d35
-rw-r--r--community/multipath-tools/service12
3 files changed, 56 insertions, 7 deletions
diff --git a/community/multipath-tools/PKGBUILD b/community/multipath-tools/PKGBUILD
index 658ad75f9..3312fe01f 100644
--- a/community/multipath-tools/PKGBUILD
+++ b/community/multipath-tools/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 73313 2012-07-06 07:32:23Z bpiotrowski $
+# $Id: PKGBUILD 75262 2012-08-17 10:00:23Z bpiotrowski $
# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Contributor: Thomas S Hatch <thatch45 ar gmail dot com>
# Contributor: Michael P <ptchinster@archlinux.us>
@@ -6,7 +6,7 @@
pkgname=multipath-tools
pkgver=0.4.9
-pkgrel=9
+pkgrel=10
pkgdesc='Multipath tools for Linux'
arch=('i686' 'x86_64')
url="http://christophe.varoqui.free.fr/"
@@ -16,13 +16,14 @@ backup=('etc/multipath.conf' 'etc/multipath.conf.annotated')
install=multipath-tools.install
options=(!emptydirs)
source=(http://christophe.varoqui.free.fr/multipath-tools/$pkgname-$pkgver.tar.bz2
- multipath.conf multipath.conf.annotated multipathd.rc
+ rc.d service multipath.conf multipath.conf.annotated
fix-build.patch buffer-overflows.patch log_enquery_overflow.patch
blacklist-cciss-devices.patch explicitly-include-posix_types.h.patch)
md5sums=('a6d4b48afc28f1f50f5ee4b1b06d2765'
+ '7c04ef96441363b0d43a2ebb13a87659'
+ '4843e91a83660e4b3acfb2d804fa344e'
'9324ff0ba8330dcb21b2fcf64988026f'
'be11462922eeeb9fcd2ba5f3f137b7d9'
- '7c04ef96441363b0d43a2ebb13a87659'
'885c0ba9c90b73cc93aa3f78005f81d6'
'c5aab36777b0304a3525533cdd31bddc'
'00eae05e02f1b85062e998574ab1b833'
@@ -45,7 +46,8 @@ build() {
package() {
make LIB='usr/lib' DESTDIR="$pkgdir" bindir='/usr/bin' libudevdir='/usr/lib/udev' install
- install -D -m 644 multipath.conf "$pkgdir"/etc/multipath.conf
- install -D -m 644 multipath.conf.annotated "$pkgdir"/etc/multipath.conf.annotated
- install -D -m 755 multipathd.rc "$pkgdir"/etc/rc.d/multipathd
+ install -Dm644 multipath.conf "$pkgdir"/etc/multipath.conf
+ install -Dm644 multipath.conf.annotated "$pkgdir"/etc/multipath.conf.annotated
+ install -Dm755 rc.d "$pkgdir"/etc/rc.d/multipathd
+ install -Dm644 service "$pkgdir"/usr/lib/systemd/system/multipathd.service
}
diff --git a/community/multipath-tools/rc.d b/community/multipath-tools/rc.d
new file mode 100644
index 000000000..7f5ef5d6a
--- /dev/null
+++ b/community/multipath-tools/rc.d
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+ stat_busy "Starting multipathd"
+ /usr/bin/multipathd
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon multipathd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping multipathd"
+ [ -f /var/run/multipathd.pid ] && kill `cat /var/run/multipathd.pid` >/dev/null 2>&1
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon multipathd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/community/multipath-tools/service b/community/multipath-tools/service
new file mode 100644
index 000000000..a70d0ee1f
--- /dev/null
+++ b/community/multipath-tools/service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Device-Mapper Multipath Device Controller
+After=syslog.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/multipathd.pid
+ExecStart=/sbin/multipathd
+ExecReload=/sbin/multipathd reconfigure
+
+[Install]
+WantedBy=multi-user.target