Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-fs/mdadm/files: raid-start.sh-3.0
Date: Thu, 03 Jun 2010 02:03:46
Message-Id: 20100603020340.7CC3B2C3ED@corvid.gentoo.org
1 vapier 10/06/03 02:03:40
2
3 Modified: raid-start.sh-3.0
4 Log:
5 Drop mdadm.conf parsing now that auto assembling is requied with newer superblock formats and the auto option actually works #321909 by Diego E. Pettenò.
6
7 Revision Changes Path
8 1.2 sys-fs/mdadm/files/raid-start.sh-3.0
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/mdadm/files/raid-start.sh-3.0?rev=1.2&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/mdadm/files/raid-start.sh-3.0?rev=1.2&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/mdadm/files/raid-start.sh-3.0?r1=1.1&r2=1.2
13
14 Index: raid-start.sh-3.0
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/sys-fs/mdadm/files/raid-start.sh-3.0,v
17 retrieving revision 1.1
18 retrieving revision 1.2
19 diff -u -r1.1 -r1.2
20 --- raid-start.sh-3.0 23 Aug 2009 11:19:38 -0000 1.1
21 +++ raid-start.sh-3.0 3 Jun 2010 02:03:40 -0000 1.2
22 @@ -1,31 +1,28 @@
23 # /lib/rcscripts/addons/raid-start.sh: Setup raid volumes at boot
24 -# Copyright 1999-2009 Gentoo Foundation
25 +# Copyright 1999-2010 Gentoo Foundation
26 # Distributed under the terms of the GNU General Public License v2
27 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/files/raid-start.sh-3.0,v 1.1 2009/08/23 11:19:38 vapier Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/mdadm/files/raid-start.sh-3.0,v 1.2 2010/06/03 02:03:40 vapier Exp $
29
30 [ -f /proc/mdstat ] || exit 0
31
32 -# Start software raid with mdadm (new school)
33 -mdadm_conf="/etc/mdadm/mdadm.conf"
34 -[ -e /etc/mdadm.conf ] && mdadm_conf="/etc/mdadm.conf"
35 -if [ -x /sbin/mdadm -a -f "${mdadm_conf}" ] ; then
36 - devs=$(awk '/^[[:space:]]*ARRAY/ { print $2 }' "${mdadm_conf}")
37 - if [ -n "${devs}" ]; then
38 - ebegin "Starting up RAID devices"
39 - output=$(mdadm -As 2>&1)
40 - ret=$?
41 - [ ${ret} -ne 0 ] && echo "${output}"
42 - eend ${ret}
43 - fi
44 +# Start software raid with mdadm
45 +if [ -x /sbin/mdadm ] ; then
46 + ebegin "Starting up RAID devices"
47 + output=$(mdadm -As 2>&1)
48 + ret=$?
49 + [ ${ret} -ne 0 ] && echo "${output}"
50 + eend ${ret}
51 fi
52
53 -partitioned_devs=$(ls /dev/md_d* 2>/dev/null)
54 -if [ -n "${partitioned_devs}" ]; then
55 - ebegin "Creating RAID device partitions"
56 - /sbin/blockdev ${partitioned_devs}
57 - eend 0
58 - # wait because vgscan runs next, and we want udev to fire
59 - sleep 1
60 +if [ -x /sbin/blockdev ] ; then
61 + partitioned_devs=$(ls /dev/md_d* 2>/dev/null)
62 + if [ -n "${partitioned_devs}" ]; then
63 + ebegin "Creating RAID device partitions"
64 + /sbin/blockdev ${partitioned_devs}
65 + eend 0
66 + # wait because vgscan runs next, and we want udev to fire
67 + sleep 1
68 + fi
69 fi
70
71 # vim:ts=4