Changeset 2811 in MondoRescue for branches/2.2.8/mindi/rootfs/sbin/init


Ignore:
Timestamp:
Apr 29, 2011, 3:39:47 PM (13 years ago)
Author:
Bruno Cornec
Message:

r2183@localhost (orig r2182): bruno | 2009-04-30 17:49:46 +0200

  • Adds support of keyword net t boot prompt to allow network launch (TB tested)
  • Fix #331 by forcing nfs mode in case of pxe boot
  • Tries to solve udev settle issue reversing the order in which tools are tested (udevadm first then udevsettle)


File:
1 edited

Legend:

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

    r2806 r2811  
    304304    fi
    305305    create_dev_makedev
    306     if [ -x /sbin/udevsettle ]; then
     306    # Newer version use udevadm for that
     307    if [ -x /sbin/udevadm ]; then
     308            /sbin/udevadm settle
     309    elif [ -x /sbin/udevsettle ]; then
    307310        /sbin/udevsettle
    308311    fi
     
    703706    LogIt "Warning - /tmp/mondo-restore.cfg not found"
    704707fi
     708if [ "`grep -i pxe /proc/cmdline`" ] || [ "`grep -i net /proc/cmdline`" ]; then
     709    # We need to get here exported variables from start-nfs
     710    . /sbin/start-nfs
     711fi
    705712
    706713if [ "`grep -i 'obdr ' /tmp/mondo-restore.cfg 2>/dev/null`" ] || [ "`grep -i ' udev' /tmp/mondo-restore.cfg 2>/dev/null`" ]; then
     
    708715    ExtractDataDisksAndLoadModules
    709716elif [ "`grep -i pxe /proc/cmdline`" ]; then
    710     # We need to get here exported variables from start-nfs
    711     . /sbin/start-nfs
    712 
    713717    # Simulate a local CD
    714718    echo "/mnt/cdrom" > /tmp/CDROM-LIVES-HERE
    715719    CD_MOUNTED_OK=yes
    716720    ExtractDataDisksAndLoadModules
     721    # Fake the conf file to force it to NFS mode, even if we made originally a CD (mandatory for mondorestore to work correctly)
     722    sed -i "s/backup-media-type.*/backup-media-type nfs/" /tmp/mondo-restore.cfg
    717723elif [ "`grep -i usb= /proc/cmdline`" ] || [ "`grep -i usb /tmp/mondo-restore.cfg 2>/dev/null | grep media-type`" ]; then
    718724    . /sbin/start-usb
Note: See TracChangeset for help on using the changeset viewer.