Changeset 3200 in MondoRescue


Ignore:
Timestamp:
Oct 28, 2013, 11:34:03 PM (10 years ago)
Author:
Bruno Cornec
Message:
  • Fix serial console detection where using -f is not working. Use -e to test the file insteaad.
File:
1 edited

Legend:

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

    r3172 r3200  
    5959    if [[ $serial != "" && -e $serial ]]; then
    6060        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"
     61    elif [[ $console != "" && -e /dev/$console ]]; then
     62        setsid sh -c "exec sh </dev/$console >/dev/$console 2>&1"
    6363    else
    6464        setsid sh -c "exec sh </dev/tty1 >/dev/tty1 2>&1"
     
    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.