Changeset 1273 in MondoRescue for branches/2.2.2/mindi/rootfs/sbin/init


Ignore:
Timestamp:
Mar 26, 2007, 7:37:17 PM (17 years ago)
Author:
Bruno Cornec
Message:
  • On CentOS 4.4 mdrun isn't available anymore so init should use mdadm instead.

(based on a patch of Momtchil Momtchev <momtchil.momtchev_at_linagora.com>)

  • mkchangelog now supports an fc option for Fedora pkg genration
  • Try to improve Fedora official packages generation
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.2/mindi/rootfs/sbin/init

    r1236 r1273  
    309309StartRaids() {
    310310    local raid_devices i
     311
     312    raid_devices=`grep /dev/md /tmp/mountlist.txt | cut -d' ' -f1`
    311313    if which raidstart > /dev/null 2> /dev/null ; then
    312         raid_devices=`grep /dev/md /tmp/mountlist.txt | cut -d' ' -f1`
    313314        for i in $raid_devices ; do
    314315            if grep `basename $i` /proc/mdstat > /dev/null 2> /dev/null ; then
     
    322323        LogIt "Running 'mdrun'" 1
    323324        mdrun
     325    elif which mdadm > /dev/null 2> /dev/null ; then
     326        LogIt "Running 'mdadm'" 1
     327        for i in $raid_devices ; do
     328            if grep `basename $i` /proc/mdstat > /dev/null 2> /dev/null ; then
     329                LogIt "$i is started already; no need to run 'mdadm $i'" 1
     330            else
     331                LogIt "Running 'mdadm $i'" 1
     332                mdadm -Ac partitions -m dev $i
     333            fi
     334        done
    324335    else
    325336        LogIt "Warning: Neither 'raidstart' nor 'mdrun''found. RAID devices may not have started." 1
Note: See TracChangeset for help on using the changeset viewer.