|
From: Heiko Z. <smi...@us...> - 2005-10-25 00:34:45
|
Update of /cvsroot/devil-linux/build/config/etc/init.d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27617/config/etc/init.d Modified Files: mountfs Log Message: - if no mdadm.conf exists, the system scans all partitions for raid devices and assembles them automatically Index: mountfs =================================================================== RCS file: /cvsroot/devil-linux/build/config/etc/init.d/mountfs,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- mountfs 19 Oct 2005 14:08:26 -0000 1.37 +++ mountfs 25 Oct 2005 00:34:32 -0000 1.38 @@ -83,7 +83,7 @@ start) # start RAID if tools and config file are installed - if [ -x /sbin/mdadm ] && [ -e /etc/mdadm.conf ]; then + if [ -x /sbin/mdadm ] ; then # check if we have all the necessary devices, otherwise create them if [ ! -e /dev/md0 ]; then for minor in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 @@ -94,11 +94,19 @@ fi echo "Starting RAID:" modprobe -k md - /sbin/mdadm --assemble --scan --verbose 2>&1 | sed \ + + if [ -e /etc/mdadm.conf ]; then + /sbin/mdadm --assemble --scan --verbose 2>&1 | sed \ -e '/No such device/d' \ -e '/has wrong uuid/d' \ -e '/no RAID superblock on/d' - print_status success + print_status success + else + /sbin/mdadm -Ac partitions -m 0 /dev/md0 + /sbin/mdadm -Ac partitions -m 1 /dev/md1 + /sbin/mdadm -Ac partitions -m 2 /dev/md2 + /sbin/mdadm -Ac partitions -m 3 /dev/md3 + fi fi # start LVM if tools are installed |