summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2010-01-24 22:20:57 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2010-01-24 22:20:57 +0000
commit1d39594677ab8cd796249e8bfc5c53b24cca64e6 (patch)
treecc4ce432cfa43682990c4992ee5c821eda551270 /sys-fs/mdadm/files
parentJoin glib and cairo useflags into one, rename openjpeg useflag to jpeg2k. (diff)
downloadhistorical-1d39594677ab8cd796249e8bfc5c53b24cca64e6.tar.gz
historical-1d39594677ab8cd796249e8bfc5c53b24cca64e6.tar.bz2
historical-1d39594677ab8cd796249e8bfc5c53b24cca64e6.zip
Bug #251730: Fix up start/stop_addon usage for BL2.
Package-Manager: portage-2.2_rc61/cvs/Linux x86_64
Diffstat (limited to 'sys-fs/mdadm/files')
-rw-r--r--sys-fs/mdadm/files/mdraid.rc-3.1.140
1 files changed, 40 insertions, 0 deletions
diff --git a/sys-fs/mdadm/files/mdraid.rc-3.1.1 b/sys-fs/mdadm/files/mdraid.rc-3.1.1
new file mode 100644
index 000000000000..571c83f82204
--- /dev/null
+++ b/sys-fs/mdadm/files/mdraid.rc-3.1.1
@@ -0,0 +1,40 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/files/mdraid.rc-3.1.1,v 1.1 2010/01/24 22:20:57 robbat2 Exp $
+
+depend() {
+ if [ ! -e /sbin/functions.sh ] ; then
+ # on baselayout-1 this could cause
+ # dependency-cycles with checkroot (before *)
+ before checkfs fsck
+ after modules
+ fi
+}
+
+run_addon() {
+ local f=/lib/rcscripts/addons/$1.sh
+ if [ -r "$f" ]; then
+ ( . "$f" )
+ fi
+}
+start_addon() {
+ run_addon "$1"-start
+}
+stop_addon() {
+ run_addon "$1"-stop
+}
+
+start() {
+ if [ -e /sbin/functions.sh ] ; then
+ eerror "The ${SVCNAME} init script is written for baselayout-2"
+ eerror "Please do not use it with baselayout-1"
+ return 1
+ fi
+
+ start_addon raid
+}
+
+stop() {
+ stop_addon raid
+}