From 46d7583d62f4fd5620fb5b8608d0b30567a94281 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 14 Aug 2012 12:21:14 +0200 Subject: [PATCH] saving uncommitted changes in /etc prior to emerge run --- init.d/mdraid | 54 +++++++++++++++++++++++++-------------------------- mdadm.conf | 2 +- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/init.d/mdraid b/init.d/mdraid index 27421e2..1a566cf 100755 --- a/init.d/mdraid +++ b/init.d/mdraid @@ -1,40 +1,40 @@ #!/sbin/runscript -# Copyright 1999-2011 Gentoo Foundation +# 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,v 1.6 2011/11/12 21:06:44 vapier Exp $ +# $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() { - before checkfs fsck - after modules + if [ ! -e /sbin/functions.sh ] ; then + # on baselayout-1 this could cause + # dependency-cycles with checkroot (before *) + before checkfs fsck + after modules + fi } -start() { - local output - - ebegin "Starting up RAID devices" - output=$(mdadm -As 2>&1) - eend $? "${output}" +run_addon() { + local f=/lib64/rcscripts/addons/$1.sh + if [ -r "$f" ]; then + ( . "$f" ) + fi +} +start_addon() { + run_addon "$1"-start +} +stop_addon() { + run_addon "$1"-stop +} - local pat="/dev/md_d*" - set -- ${pat} - if [ "$*" != "${pat}" ] ; then - ebegin "Creating RAID device partitions" - blockdev "$@" - eend $? - # wait because vgscan runs next, and we want udev to fire - sleep 1 +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 - return 0 + start_addon raid } stop() { - local output - - # XXX: Maybe drop this check ? - [ ! -e /etc/mdadm/mdadm.conf ] && [ ! -e /etc/mdadm.conf ] && return 0 - - ebegin "Shutting down RAID devices (mdadm)" - output=$(mdadm -Ss 2>&1) - eend $? "${output}" + stop_addon raid } diff --git a/mdadm.conf b/mdadm.conf index d9d8d39..7bdff67 100644 --- a/mdadm.conf +++ b/mdadm.conf @@ -59,7 +59,7 @@ # When used in --follow (aka --monitor) mode, mdadm needs a # mail address and/or a program. This can be given with "mailaddr" # and "program" lines to that monitoring can be started using -# mdadm --follow --scan & echo $! > /run/mdadm/mon.pid +# mdadm --follow --scan & echo $! > /var/run/mdadm # If the lines are not found, mdadm will exit quietly #MAILADDR root@mydomain.tld #PROGRAM /usr/sbin/handle-mdadm-events -- 2.39.5