[readonly/geninitrd/devel: 176/334] - drop support for raid using raid_start in busybox, it's broken - use initrd-mdadm

draenog draenog at pld-linux.org
Sat Nov 2 19:26:19 CET 2013


commit 8c4ce35e9bf5cec04266c369308da133627ffe61
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sat Jan 17 20:12:12 2004 +0000

    - drop support for raid using raid_start in busybox, it's broken - use initrd-mdadm
    
    svn-id: @3196

 geninitrd | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)
---
diff --git a/geninitrd b/geninitrd
index 1ca41af..4aa05fa 100755
--- a/geninitrd
+++ b/geninitrd
@@ -44,7 +44,7 @@ usage () {
 	echo "       [--with=<module>] [--image-version] [--fstab=<fstab>] [--nocompress]" 1>&2
 	echo "       [--initrdfs=rom|ext2|cram] [--modules-conf=<modules.conf>]" 1>&2
 	echo "       [--with-raidstart] [--without-raidstart] [--with-insmod-static]" 1>&2
-	echo "       [--with-mdadm-static] [--without-bootsplash]" 1>&2
+	echo "       [--without-bootsplash]" 1>&2
 	echo "       <initrd-image> <kernel-version>" 1>&2
 	echo "       (ex: `basename $0` /boot/initrd-2.2.5-15.img 2.2.5-15)" 1>&2
 	exit 1
@@ -316,7 +316,7 @@ find_root() {
 }
 
 find_modules_softraid() {
-        if is_yes "$USEMDADMSTATIC" || [ -f /etc/mdadm.conf ] ; then
+        if [ -f /etc/mdadm.conf ] ; then
 	    [ -n "$verbose" ] && echo "Finding RAID details using mdadm for rootdev=$1"
 	    eval `/sbin/mdadm --examine  --scan --config=/etc/mdadm.conf | \
 	    	  awk -v rootdev="$1" '
@@ -654,9 +654,6 @@ while [ $# -gt 0 ]; do
 	--without-raidstart)
 		USERAIDSTART="no"
 		;;
-	--use-mdadm-static|--with-mdadm-static)
-		USEMDADMSTATIC="yes"
-		;;
 	--use-insmod-static|--with-insmod-static)
 		USEINSMODSTATIC="yes"
 		;;
@@ -927,14 +924,15 @@ done
 #fi
 
 if is_yes "$USERAIDSTART" && is_yes "$raidfound" ; then
-    	if is_yes "$USEMDADMSTATIC" ; then
-		[ -n "$verbose" ] && echo "Setting up mdadm"
-		inst /sbin/initrd-mdadm "$MNTIMAGE/bin/mdadm"
-		echo "mdadm --assemble $rootdev $dev_list" >> "$s"
-	else
-		[ -n "$verbose" ] && echo "Enabling raid ($rootdev $dev_list)"
-		echo "raid_start $rootdev $dev_list" >> "$s"
+	[ -n "$verbose" ] && echo "Setting up mdadm ($rootdev $dev_list)"
+	
+	if [ ! -x /sbin/initrd-mdadm ] ; then
+	    	echo "/sbin/initrd-mdadm is missing !"
+		exit 1
 	fi
+											   
+	inst /sbin/initrd-mdadm "$MNTIMAGE/bin/mdadm"
+	echo "mdadm --assemble $rootdev $dev_list" >> "$s"
 
 	# needed to determine md-version
 	if [ "$rootdev" != /dev/md0 ] ; then
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/readonly/geninitrd.git/commitdiff/398807324938659207036e520c0950a61ef50c11



More information about the pld-cvs-commit mailing list