Changeset 3244 in MondoRescue for branches/3.0/mindi


Ignore:
Timestamp:
Jan 30, 2014, 11:13:12 PM (10 years ago)
Author:
Bruno Cornec
Message:
  • apply patch made on r3200/3.2 branch to 3.0 (Fix serial console detection where using -f is not working. Use -e to test the file instead)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mindi/rootfs/etc/init.d/rcS

    r3172 r3244  
    5353    mount / -o rw,remount > /dev/null 2> /dev/null
    5454    for i in `cat /proc/cmdline`; do
    55         echo $i | grep -qi console= && console=`echo $i | cut -d= -f2`
    56         echo $i | grep -qi serial= && serial=`echo $i | cut -d= -f2`
    57     done
    58     LogIt "Launching Shell"
    59     if [[ $serial != "" && -e $serial ]]; then
    60         setsid sh -c "exec sh <$serial >$serial 2>&1"
    61     elif [[ $console != "" && -e $console ]]; then
    62         setsid sh -c "exec sh <$console >$console 2>&1"
    63     else
    64         setsid sh -c "exec sh </dev/tty1 >/dev/tty1 2>&1"
    65     fi
     55        echo $i | grep -qi console= && console=`echo $i | cut -d= -f2`
     56        echo $i | grep -qi serial= && serial=`echo $i | cut -d= -f2`
     57    done
     58    LogIt "Launching Shell"
     59    if [[ $serial != "" && -e $serial ]]; then
     60        setsid sh -c "exec sh <$serial >$serial 2>&1"
     61    elif [[ $console != "" && -e /dev/$console ]]; then
     62        setsid sh -c "exec sh </dev/$console >/dev/$console 2>&1"
     63    else
     64        setsid sh -c "exec sh </dev/tty1 >/dev/tty1 2>&1"
     65    fi
    6666}
    6767
     
    111111    # Required to have a correct serial console support (MP on ia64 or VSP with iLO2 e.g.)
    112112    for i in `cat /proc/cmdline` ; do
    113         echo $i | grep -qi serial= && serial=`echo $i | cut -d= -f2`
     113        echo $i | grep -qi serial= && serial=`echo $i | cut -d= -f2`
    114114    done
    115115    # Doing that is only valid when using a real serial line
    116     if [ -f $serial ]; then
     116    if [[ $serial != "" && -e $serial ]]; then
    117117        LogIt "Redirecting serial $serial to /dev/tty" 1
    118118        ln -s -f $serial /dev/tty
Note: See TracChangeset for help on using the changeset viewer.