[CentOS-devel] RE: CentOS mkinitrd support for dmraid

Mon Apr 17 21:04:57 UTC 2006
Hovhannes Tumanyan <hovhannes_tumanyan at yahoo.com>

Michael,
Thanks for suggestion. 
Contents of diff file produced using diff -u are below
and in the attachment.

Thank you,
Hovhannes


--- /sbin/mkinitrd      2005-06-10 04:52:15.000000000
-0700
+++ /sbin/mkinitrd.dmraid       2006-04-16
17:35:42.000000000 -0700
@@ -56,6 +56,7 @@
 usage () {
     echo "usage: `basename $0` [--version] [-v] [-f]
[--preload <module>]" >&2
     echo "       [--omit-scsi-modules]
[--omit-raid-modules] [--omit-lvm-modules]" >&2
+    echo "       [--omit-dmraid]" >&2
     echo "       [--with=<module>] [--image-version]
[--fstab=<fstab>] [--nocompress]" >&2
     echo "       [--builtin=<module>] [--nopivot]
<initrd-image> <kernel-version>" >&2
     echo "" >&2
@@ -257,6 +258,9 @@
        --omit-lvm-modules)
            nolvm=1
            ;;
+       --omit-dmraid)
+           nodmraid=yes
+           ;;
        --image-version)
            img_vers=yes
            ;;
@@ -627,6 +631,10 @@
     fi
 fi

+if [ -z "$nodmraid" -a "$kernelmajor" == "2.6" ];
then
+    inst /sbin/dmraid.static "$MNTIMAGE/bin/dmraid"
+fi
+
 echo "#!/bin/nash" > $RCFILE
 echo "" >> $RCFILE

@@ -708,6 +716,11 @@
     echo "mkdevices /dev" >> $RCFILE
 fi

+if [ -z "$nodmraid" ]; then
+    echo "echo Activating software raid (dmraid)" >>
$RCFILE
+    echo "dmraid -ay" >> $RCFILE
+fi
+
 if [ -n "$loopDev" ]; then
     mkdir /initrd
     cp -a $loopDev $MNTIMAGE/dev
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mkdinitrd.diff
URL: <http://lists.centos.org/pipermail/centos-devel/attachments/20060417/d52f4e8d/attachment-0007.ksh>