summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-06-10 01:35:55 +0000
committerMike Frysinger <vapier@gentoo.org>2005-06-10 01:35:55 +0000
commite272c6a42a46fe9c2f462b8ea1f5270d5866794b (patch)
treec17fa4cdcf3fa3b844b3de1ac301df1cba9a0b71 /sys-fs/raidtools
parent!elibc_uclibc?() -> elibc_glibc?() (diff)
downloadgentoo-2-e272c6a42a46fe9c2f462b8ea1f5270d5866794b.tar.gz
gentoo-2-e272c6a42a46fe9c2f462b8ea1f5270d5866794b.tar.bz2
gentoo-2-e272c6a42a46fe9c2f462b8ea1f5270d5866794b.zip
Add a raid-stop script by Milan Holzäpfel #95594.
(Portage version: 2.0.51.22-r1)
Diffstat (limited to 'sys-fs/raidtools')
-rw-r--r--sys-fs/raidtools/ChangeLog6
-rw-r--r--sys-fs/raidtools/files/raid-stop.sh26
-rw-r--r--sys-fs/raidtools/raidtools-1.00.3-r6.ebuild4
3 files changed, 33 insertions, 3 deletions
diff --git a/sys-fs/raidtools/ChangeLog b/sys-fs/raidtools/ChangeLog
index 54d8a41b9b3e..40ba5e3b1ab8 100644
--- a/sys-fs/raidtools/ChangeLog
+++ b/sys-fs/raidtools/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-fs/raidtools
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/raidtools/ChangeLog,v 1.21 2005/05/28 21:36:14 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/raidtools/ChangeLog,v 1.22 2005/06/10 01:34:57 vapier Exp $
+
+ 10 Jun 2005; Mike Frysinger <vapier@gentoo.org> +files/raid-stop.sh,
+ raidtools-1.00.3-r6.ebuild:
+ Add a raid-stop script by Milan Holzäpfel #95594.
*raidtools-1.00.3-r6 (28 May 2005)
diff --git a/sys-fs/raidtools/files/raid-stop.sh b/sys-fs/raidtools/files/raid-stop.sh
new file mode 100644
index 000000000000..fafd41422b83
--- /dev/null
+++ b/sys-fs/raidtools/files/raid-stop.sh
@@ -0,0 +1,26 @@
+# /lib/rcscripts/addons/raid-stop.sh: Stop raid volumes at shutdown
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/raidtools/files/raid-stop.sh,v 1.1 2005/06/10 01:34:57 vapier Exp $
+
+[[ -f /proc/mdstat ]] || exit 0
+
+# Stop software raid with raidtools (old school)
+if [[ -x /sbin/raidstop && -f /etc/raidtab ]] ; then
+ ebegin "Shutting down RAID devices (raidtools)"
+ output=$(raidstop -a 2>&1)
+ ret=$?
+ [[ ${ret} -ne 0 ]] && echo "${output}"
+ eend ${ret}
+fi
+
+# Stop software raid with mdadm (new school)
+if [[ -x /sbin/mdadm && -f /etc/mdadm.conf ]] ; then
+ ebegin "Shutting down RAID devices (mdadm)"
+ output=$(mdadm -Ss 2>&1)
+ ret=$?
+ [[ ${ret} -ne 0 ]] && echo "${output}"
+ eend ${ret}
+fi
+
+# vim:ts=4
diff --git a/sys-fs/raidtools/raidtools-1.00.3-r6.ebuild b/sys-fs/raidtools/raidtools-1.00.3-r6.ebuild
index 9fdfec12088e..945927f8621c 100644
--- a/sys-fs/raidtools/raidtools-1.00.3-r6.ebuild
+++ b/sys-fs/raidtools/raidtools-1.00.3-r6.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/raidtools/raidtools-1.00.3-r6.ebuild,v 1.1 2005/05/28 21:36:14 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/raidtools/raidtools-1.00.3-r6.ebuild,v 1.2 2005/06/10 01:34:57 vapier Exp $
inherit flag-o-matic eutils
@@ -41,7 +41,7 @@ src_unpack() {
src_install() {
make install ROOTDIR="${D}" || die
insinto /$(get_libdir)/rcscripts/addons
- doins "${FILESDIR}"/raid-start.sh || die "addon failed"
+ doins "${FILESDIR}"/raid-{start,stop}.sh || die "addon failed"
exeinto /etc/cron.daily
newexe "${FILESDIR}"/raidtools.cron raidtools