aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-02-13 17:05:38 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-02-13 17:05:38 +0000
commit97e3a2731159c23664fd519bb531fb66af20b2d3 (patch)
tree981f5d4965f67eed1887e43909008c48b5395d62 /core
parent8bd29a287e98104263af412415bd5325100c0e44 (diff)
parentc8eae56b1f47e68fc35bef5bd7b5966997791280 (diff)
downloadaports-97e3a2731159c23664fd519bb531fb66af20b2d3.tar.bz2
aports-97e3a2731159c23664fd519bb531fb66af20b2d3.tar.xz
Merge remote branch 'clandmeter/master' into clandmeter
Diffstat (limited to 'core')
-rw-r--r--core/mdadm/APKBUILD30
-rw-r--r--core/mdadm/mdadm.confd5
-rw-r--r--core/mdadm/mdadm.initd27
3 files changed, 62 insertions, 0 deletions
diff --git a/core/mdadm/APKBUILD b/core/mdadm/APKBUILD
new file mode 100644
index 0000000000..f0a9f8926d
--- /dev/null
+++ b/core/mdadm/APKBUILD
@@ -0,0 +1,30 @@
+# Contributor: Carlo Landmeter <clandmeter at gmail>
+# Maintainer: Carlo Landmeter <clandmeter at gmail>
+pkgname=mdadm
+pkgver=2.6.8
+pkgrel=0
+pkgdesc="a tool for managing Linux Software RAID arrays"
+url="http://neil.brown.name/blog/mdadm"
+license="GPL-2"
+depends="uclibc"
+makedepends="groff"
+subpackages="$pkgname-doc"
+source="http://www.kernel.org/pub/linux/utils/raid/${pkgname}/${pkgname}-${pkgver}.tar.gz
+ ${pkgname}.initd
+ ${pkgname}.confd
+ "
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make || return 1
+ make INSTALL=/bin/install DESTDIR=$pkgdir install
+
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+ install -m644 -D mdadm.conf-example "$pkgdir"/etc/mdadm.conf
+}
+
+md5sums="bcc30968711a078387fba44867eb7a23 mdadm-2.6.8.tar.gz
+96b323ba5b778aeb905c119b9547b2a5 mdadm.initd
+16d2b8eb2e17184357db503470fdd8eb mdadm.confd"
diff --git a/core/mdadm/mdadm.confd b/core/mdadm/mdadm.confd
new file mode 100644
index 0000000000..f1ed9c41d2
--- /dev/null
+++ b/core/mdadm/mdadm.confd
@@ -0,0 +1,5 @@
+# Misc options to pass to mdadm in monitor mode.
+# For more info, run `mdadm --monitor --help` or see
+# the mdadm(8) manpage.
+
+OPTS="--syslog"
diff --git a/core/mdadm/mdadm.initd b/core/mdadm/mdadm.initd
new file mode 100644
index 0000000000..747661e8ee
--- /dev/null
+++ b/core/mdadm/mdadm.initd
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+
+# Sample init.d file for alpine linux.
+
+NAME=mdadm
+DAEMON=/sbin/$NAME
+
+depend() {
+ use logger dns net
+}
+
+start() {
+ ebegin "Starting ${NAME}"
+ start-stop-daemon --start --quiet --background \
+ --exec ${DAEMON} -- \
+ --monitor --scan \
+ --daemonise ${OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${NAME}"
+ start-stop-daemon --stop --quiet \
+ --exec ${DAEMON}
+ eend $?
+}
+