Changeset 3051 in MondoRescue for branches/3.0/mindi


Ignore:
Timestamp:
Oct 19, 2012, 3:16:17 AM (12 years ago)
Author:
Bruno Cornec
Message:
  • Fix #649 by adding serial port detection in GetShell function which was harcoding the tty to use (Matthew Ross). Also update mindi's doc.
Location:
branches/3.0/mindi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mindi/README.bootparam

    r2882 r3051  
    7070
    7171serial=/dev/ttySx
    72     When using a serial console, associate it to the tty device so it works correctly at restore time. By default set up /dev/ttyS0 as serial console. Pass the value of your serial console if different.
     72    When using a serial console, associate it to the tty device so it works correctly at restore time. By default set up /dev/ttyS0 as serial console. Pass the value of your serial console if different. You may also want to pass console=ttySx so your kernel can deal with it. serial takes precedence over console for mindi.
    7373
    7474textonly
  • branches/3.0/mindi/rootfs/etc/init.d/rcS

    r3035 r3051  
    5353    mount / -o rw,remount > /dev/null 2> /dev/null
    5454    LogIt "Launching Shell"
    55     setsid sh -c 'exec sh </dev/tty1 >/dev/tty1 2>&1'
     55    for i in `cat /proc/cmdline`; do
     56        echo $i | grep -qi console= && console=`echo $i | cut -d= -f2`
     57        echo $i | grep -qi serial= && serial=`echo $i | cut -d= -f2`
     58    done
     59    LogIt "Launching Shell"
     60    if [[ $serial != "" && -e $serial ]]; then
     61        setsid sh -c "exec sh <$serial >$serial 2>&1"
     62    elif [[ $console != "" && -e $console ]]; then
     63        setsid sh -c "exec sh <$console >$console 2>&1"
     64    else
     65        setsid sh -c "exec sh </dev/tty1 >/dev/tty1 2>&1"
     66    fi
    5667}
    5768
Note: See TracChangeset for help on using the changeset viewer.