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
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)
-rw-r--r--sys-fs/mdadm/ChangeLog6
-rw-r--r--sys-fs/mdadm/files/raid-stop.sh26
-rw-r--r--sys-fs/mdadm/mdadm-1.11.0.ebuild4
-rw-r--r--sys-fs/mdadm/mdadm-1.9.0-r1.ebuild4
-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
7 files changed, 68 insertions, 8 deletions
diff --git a/sys-fs/mdadm/ChangeLog b/sys-fs/mdadm/ChangeLog
index 93fbddd4016c..dd27f5cd2fd1 100644
--- a/sys-fs/mdadm/ChangeLog
+++ b/sys-fs/mdadm/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-fs/mdadm
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/ChangeLog,v 1.5 2005/04/11 22:46:12 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/ChangeLog,v 1.6 2005/06/10 01:35:55 vapier Exp $
+
+ 10 Jun 2005; Mike Frysinger <vapier@gentoo.org> +files/raid-stop.sh,
+ mdadm-1.9.0-r1.ebuild, mdadm-1.11.0.ebuild:
+ Add a raid-stop script by Milan Holzäpfel #95594.
*mdadm-1.11.0 (11 Apr 2005)
diff --git a/sys-fs/mdadm/files/raid-stop.sh b/sys-fs/mdadm/files/raid-stop.sh
new file mode 100644
index 000000000000..412f80c264f1
--- /dev/null
+++ b/sys-fs/mdadm/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/mdadm/files/raid-stop.sh,v 1.1 2005/06/10 01:35:55 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/mdadm/mdadm-1.11.0.ebuild b/sys-fs/mdadm/mdadm-1.11.0.ebuild
index 4d622d7b867f..59f86e5a0831 100644
--- a/sys-fs/mdadm/mdadm-1.11.0.ebuild
+++ b/sys-fs/mdadm/mdadm-1.11.0.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/mdadm/mdadm-1.11.0.ebuild,v 1.1 2005/04/11 22:46:12 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/mdadm-1.11.0.ebuild,v 1.2 2005/06/10 01:35:55 vapier Exp $
inherit eutils
@@ -35,7 +35,7 @@ src_compile() {
src_install() {
make DESTDIR="${D}" install || die "make install failed"
exeinto /$(get_libdir)/rcscripts/addons
- doexe "${FILESDIR}"/raid-start.sh || die "addon failed"
+ doexe "${FILESDIR}"/raid-{start,stop}.sh || die "addon failed"
dodoc INSTALL TODO "ANNOUNCE-${PV}"
insinto /etc
diff --git a/sys-fs/mdadm/mdadm-1.9.0-r1.ebuild b/sys-fs/mdadm/mdadm-1.9.0-r1.ebuild
index 7ca2be90cf78..51ed2218f334 100644
--- a/sys-fs/mdadm/mdadm-1.9.0-r1.ebuild
+++ b/sys-fs/mdadm/mdadm-1.9.0-r1.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/mdadm/mdadm-1.9.0-r1.ebuild,v 1.4 2005/04/11 22:18:20 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/mdadm-1.9.0-r1.ebuild,v 1.5 2005/06/10 01:35:55 vapier Exp $
inherit eutils
@@ -36,7 +36,7 @@ src_compile() {
src_install() {
make DESTDIR="${D}" install || die "make install failed"
exeinto /$(get_libdir)/rcscripts/addons
- doexe "${FILESDIR}"/raid-start.sh || die "addon failed"
+ doexe "${FILESDIR}"/raid-{start,stop}.sh || die "addon failed"
dodoc INSTALL TODO "ANNOUNCE-${PV}"
insinto /etc
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