Changeset 1621 in MondoRescue for branches/stable/mindi/rootfs/sbin/init


Ignore:
Timestamp:
Sep 7, 2007, 11:56:50 AM (17 years ago)
Author:
Bruno Cornec
Message:

(merge -r1599:1614 $SVN_M/branches/2.2.5 .)

File:
1 edited

Legend:

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

    r1581 r1621  
    322322                LogIt "$i is started already; no need to run 'mdadm $i'" 1
    323323            else
    324                 LogIt "Running 'mdadm $i'" 1
    325                 mdadm -Ac partitions -m dev $i
     324                if [ -f /etc/mdadm.conf ] ; then
     325                    LogIt "Running 'mdadm $i' with user supplied /etc/mdadm.conf" 1
     326                    mdadm -A $i -c /etc/mdadm.conf
     327                elif [ -f /etc/mdadm/mdadm.conf ] ; then
     328                    LogIt "Running 'mdadm $i' with user supplied /etc/mdadm/mdadm.conf" 1
     329                    mdadm -A $i -c /etc/mdadm/mdadm.conf
     330                else
     331                    LogIt "Running 'mdadm $i'" 1
     332                    mdadm -Ac partitions -m dev $i
     333                fi
    326334            fi
    327335        done
     
    558566    LogIt "I think this media has no archives on it."
    559567fi
    560 echo -en "Type 'exit' to reboot the PC\n"
    561 umount /mnt/cdrom 2> /dev/null
    562 mount / -o rw,remount > /dev/null 2> /dev/null
    563 LogIt "Launching Shell"
    564 sh
     568if grep "RESTORE" /proc/cmdline > /dev/null 2> /dev/null ; then
     569    echo "Rebooting in 10 seconds automatically as per reboot order"
     570    echo -en "Press ^C to interrupt if you have to ..."
     571    for i in 1 2 3 4 5 6 7 8 9 10 ; do
     572        sleep 1
     573        echo -en "."
     574    done
     575    echo "Boom."
     576    sleep 1
     577else
     578    echo -en "Type 'exit' to reboot the PC\n"
     579    umount /mnt/cdrom 2> /dev/null
     580    mount / -o rw,remount > /dev/null 2> /dev/null
     581    LogIt "Launching Shell"
     582    sh
     583fi
    565584CaughtSoftReset
    566585# reboot
Note: See TracChangeset for help on using the changeset viewer.