diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-03-02 04:32:07 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-03-02 04:32:07 +0000 |
commit | 2d96f6223ea20b5f32bcb40263cabc5af33ec4f0 (patch) | |
tree | ec9a56b076067382ec7de37fc1e1e668ba4c1b66 /sys-fs/mdadm/files | |
parent | move to sys-fs (diff) | |
download | gentoo-2-2d96f6223ea20b5f32bcb40263cabc5af33ec4f0.tar.gz gentoo-2-2d96f6223ea20b5f32bcb40263cabc5af33ec4f0.tar.bz2 gentoo-2-2d96f6223ea20b5f32bcb40263cabc5af33ec4f0.zip |
move from sys-apps
Diffstat (limited to 'sys-fs/mdadm/files')
-rw-r--r-- | sys-fs/mdadm/files/digest-mdadm-1.6.0 | 1 | ||||
-rw-r--r-- | sys-fs/mdadm/files/digest-mdadm-1.7.0 | 1 | ||||
-rw-r--r-- | sys-fs/mdadm/files/digest-mdadm-1.8.1 | 1 | ||||
-rw-r--r-- | sys-fs/mdadm/files/digest-mdadm-1.9.0-r1 | 1 | ||||
-rw-r--r-- | sys-fs/mdadm/files/mdadm-1.9.0-dont-make-man.patch | 11 | ||||
-rwxr-xr-x | sys-fs/mdadm/files/mdadm.rc | 39 | ||||
-rwxr-xr-x | sys-fs/mdadm/files/raid-start.sh | 40 |
7 files changed, 94 insertions, 0 deletions
diff --git a/sys-fs/mdadm/files/digest-mdadm-1.6.0 b/sys-fs/mdadm/files/digest-mdadm-1.6.0 new file mode 100644 index 000000000000..3565345aa693 --- /dev/null +++ b/sys-fs/mdadm/files/digest-mdadm-1.6.0 @@ -0,0 +1 @@ +MD5 49b6f89709d95f103ca7c8fd83986c16 mdadm-1.6.0.tgz 114172 diff --git a/sys-fs/mdadm/files/digest-mdadm-1.7.0 b/sys-fs/mdadm/files/digest-mdadm-1.7.0 new file mode 100644 index 000000000000..fcc3ec365562 --- /dev/null +++ b/sys-fs/mdadm/files/digest-mdadm-1.7.0 @@ -0,0 +1 @@ +MD5 eb56af3d78cdc4f413bb6f0ec08c51d6 mdadm-1.7.0.tgz 88568 diff --git a/sys-fs/mdadm/files/digest-mdadm-1.8.1 b/sys-fs/mdadm/files/digest-mdadm-1.8.1 new file mode 100644 index 000000000000..9c6f2aa7dfac --- /dev/null +++ b/sys-fs/mdadm/files/digest-mdadm-1.8.1 @@ -0,0 +1 @@ +MD5 d6298c34590334cad3b951bc590e4007 mdadm-1.8.1.tgz 101291 diff --git a/sys-fs/mdadm/files/digest-mdadm-1.9.0-r1 b/sys-fs/mdadm/files/digest-mdadm-1.9.0-r1 new file mode 100644 index 000000000000..003e40ff7591 --- /dev/null +++ b/sys-fs/mdadm/files/digest-mdadm-1.9.0-r1 @@ -0,0 +1 @@ +MD5 4c5667761ba98890069127e54682e879 mdadm-1.9.0.tgz 94999 diff --git a/sys-fs/mdadm/files/mdadm-1.9.0-dont-make-man.patch b/sys-fs/mdadm/files/mdadm-1.9.0-dont-make-man.patch new file mode 100644 index 000000000000..6b33cdeec8d2 --- /dev/null +++ b/sys-fs/mdadm/files/mdadm-1.9.0-dont-make-man.patch @@ -0,0 +1,11 @@ +The .man files are never installed so there's no point in +generating them, especially since the source manpages are +installed. + +--- mdadm-1.9.0/Makefile ++++ mdadm-1.9.0/Makefile +@@ -69,3 +69,3 @@ + +-all : mdadm mdadm.man md.man mdadm.conf.man ++all : mdadm + diff --git a/sys-fs/mdadm/files/mdadm.rc b/sys-fs/mdadm/files/mdadm.rc new file mode 100755 index 000000000000..67fea0e74998 --- /dev/null +++ b/sys-fs/mdadm/files/mdadm.rc @@ -0,0 +1,39 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/files/mdadm.rc,v 1.1 2005/03/02 04:32:07 vapier Exp $ + +depend() { + use logger dns net +} + +checkconfig() { + if [ ! -f /etc/mdadm.conf ] ; then + eerror "File /etc/mdadm.conf does not exist" + return 1 + fi + if ! grep -qs '^\(MAILADDR\|PROGRAM\) .' /etc/mdadm.conf ; then + eerror "No monitoring action defined in /etc/mdadm.conf" + return 1 + fi +} + +start() { + checkconfig || return 1 + + local ret + ebegin "Starting mdadm monitor" + /sbin/mdadm --monitor --scan & + ret=$? + echo $! > /var/run/mdadm.pid + eend ${ret} +} + +stop() { + local ret + ebegin "Stopping mdadm monitor" + start-stop-daemon --stop --pidfile /var/run/mdadm.pid + ret=$? + rm -f /var/run/mdadm.pid + eend ${ret} +} diff --git a/sys-fs/mdadm/files/raid-start.sh b/sys-fs/mdadm/files/raid-start.sh new file mode 100755 index 000000000000..1e1985b39a23 --- /dev/null +++ b/sys-fs/mdadm/files/raid-start.sh @@ -0,0 +1,40 @@ +# /lib/rcscripts/addons/raid-start.sh: Setup raid volumes at boot +# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/files/raid-start.sh,v 1.1 2005/03/02 04:32:07 vapier Exp $ + +[[ -f /proc/mdstat ]] || exit 0 + +# We could make this dynamic, but eh +#[[ -z ${MAJOR} ]] && export MAJOR=$(awk '$2 == "md" { print $1 }' /proc/devices) +MAJOR=9 + +# Try to make sure the devices exist before we use them +create_devs() { + local d + for d in $@ ; do + d=${d/\/dev\/} + [[ -e /dev/${d} ]] && continue + mknod /dev/${d} b ${MAJOR} ${d##*md} >& /dev/null + done +} + +# Start software raid with raidtools (old school) +if [[ -x /sbin/raidstart && -f /etc/raidtab ]] ; then + create_devs $(awk '/^[[:space:]]*raiddev/ { print $2 }' /etc/raidtab) + ebegin "Starting up RAID devices (raidtools)" + output=$(raidstart -a 2>&1) + ret=$? + [[ ${ret} -ne 0 ]] && echo "${output}" + eend ${ret} +fi + +# Start software raid with mdadm (new school) +if [[ -x /sbin/mdadm && -f /etc/mdadm.conf ]] ; then + create_devs $(awk '/^[[:space:]]*ARRAY/ { print $2 }' /etc/mdadm.conf) + ebegin "Starting up RAID devices (mdadm)" + output=$(mdadm -As 2>&1) + ret=$? + [[ ${ret} -ne 0 ]] && echo "${output}" + eend ${ret} +fi + +# vim:ts=4 |