Changeset 2487


Ignore:
Timestamp:
Nov 18, 2009, 9:40:56 PM (10 years ago)
Author:
bruno
Message:

r3620@localhost: bruno | 2009-11-18 10:31:36 +0100

  • Only link /dev/tty to serial port when there is indeed a serial port. If not breaks mondorestore on normal console
Location:
branches
Files:
2 edited

Legend:

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

    r2484 r2487  
    7474            echo -en "\rExtracting /$fname...     "
    7575            tar -zxf /$fname || LogIt "Error occurred while extracting /$fname"
     76            rm -f /$fname
    7677        fi
    7778    done
     
    9495    # By default first serial line is configured as tty
    9596    # Required to have a correct serial console support (MP on ia64 or VSP with iLO2 e.g.)
    96     serial=/dev/ttyS0
    9797    for i in `cat /proc/cmdline` ; do
    9898        echo $i | grep -qi serial= && serial=`echo $i | cut -d= -f2`
    9999    done
    100     ln -s -f $serial /dev/tty
     100    # Doing that is only valid when using a real serial line
     101    if [ -f $serial ]; then
     102        ln -s -f $serial /dev/tty
     103    fi
    101104}
    102105
     
    104107LoadKeymap() {
    105108    local fname
    106     fname=`cat /tmp/KEYMAP-LIVES-HERE 2> /dev/null`
     109    fname=`cat $MINDI_CACHE/KEYMAP-LIVES-HERE 2> /dev/null`
    107110    [ "$fname" = "" ] && return
    108111    if which loadkeys > /dev/null 2> /dev/null ; then
    109112        loadkeys $fname
    110 # loadkmap != loadkeys
    111 #    elif which loadkmap > /dev/null 2> /dev/null ; then
    112 #        loadkmap < $fname
    113113    else
    114114        LogIt "Using default keyboard map." 1
     
    217217
    218218
    219 PauseForRaids() {
    220     if [ "`dmesg | grep -i "RAID Controller"`" != "" ] || [ "`dmesg | grep -i "Vendor: 3ware"`" != "" ] ; then
    221         LogIt "RAID controller(s) detected. Pausing 10 seconds to let them warm up." 1
    222         echo -en "Pausing..."
    223         for i in 1 2 3 4 5 6 7 8 9 10 ; do
    224             sleep 1
    225             echo -en "$(($i*10))%..."
    226         done
    227         echo "Done."
    228     fi
    229 }
    230 
    231 
    232219# --- cater for arbitrary locations of devfsd.conf by using the
    233220#     config file path compiled into devfsd
     
    333320        fi
    334321    done
     322    rm -rf /dev.static
    335323    echo $PKLVL > /proc/sys/kernel/printk
    336324}
     
    410398            sleep 1
    411399        done
     400        rm -f /tmp/start-lvm
    412401        echo "Done."
    413402    fi
     
    590579        rm -rf /tmp.old
    591580        mkdir -p /tmp/tmpfs
    592     echo "Done."
    593     LogIt "Successfully mounted dynamic /tmp ramdisk"
    594 #   mkdir -p /tmp/tmpfs/var
    595 #        mv -f /var/log /tmp/tmpfs/var/log
    596 #        ln -sf /tmp/tmpfs/var/log /var/log
     581        echo "Done."
     582        LogIt "Successfully mounted dynamic /tmp ramdisk"
    597583    fi
    598584}
     
    663649LOGFILE=/var/log/mondorestore.log
    664650PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/mondo:/usr/games
    665 GROOVY=/tmp/groovy-stuff
     651GROOVY=$MINDI_CACHE/groovy-stuff
    666652USER=root
    667653ARCH=`uname -m`
     
    673659mount -o remount rw /
    674660[ ! "$GROOVY" ] && Die "I'm not groovy!"
    675 for i in $GROOVY /mnt/cdrom /mnt/isodir /var/local/petris /tmp/isodir; do
     661for i in /mnt/cdrom /mnt/isodir /var/local/petris /tmp/isodir; do
    676662    mkdir -p $i
    677663done
     
    740726elif [ "`grep -i pxe $CMDLINE`" ]; then
    741727    # Simulate a local CD
    742     echo "/mnt/cdrom" > /tmp/CDROM-LIVES-HERE
     728    echo "/mnt/cdrom" > $MINDI_CACHE/CDROM-LIVES-HERE
    743729    CD_MOUNTED_OK=yes
    744730    ExtractDataDisksAndLoadModules
     
    749735
    750736    # Simulate a local CD
    751     echo "/mnt/cdrom" > /tmp/CDROM-LIVES-HERE
     737    echo "/mnt/cdrom" > $MINDI_CACHE/CDROM-LIVES-HERE
    752738    CD_MOUNTED_OK=yes
    753739    ExtractDataDisksAndLoadModules
     
    769755WelcomeMessage
    770756RstHW
    771 echo "Starting potential Raid/LVMs ..."
    772 PauseForRaids
    773757StartRaids
    774758StartMpath
     
    835819ide-opt
    836820
    837 #ctrlaltdel soft
    838 for path in /usr.bin /usr/bin ; do
    839     fname=$path/nano
    840     [ -e "$fname" ] && ln -sf $fname /usr/bin/pico
    841 done
    842 res=`which nano 2> /dev/null`
    843 [ "$res" ] && ln -sf /usr/bin/
    844 for i in null stdout stdin stderr ; do
    845     cp -af /dev/$i /tmp
    846 done
    847821# Not sure it's still needed, but shouldn't hurt
    848822if [ -e "/tmp/USE-UDEV" ] ; then
  • branches/2.2.9/mindi/rootfs/sbin/init

    r2484 r2487  
    8383    # By default first serial line is configured as tty
    8484    # Required to have a correct serial console support (MP on ia64 or VSP with iLO2 e.g.)
    85     serial=/dev/ttyS0
    8685    for i in `cat /proc/cmdline` ; do
    8786        echo $i | grep -qi serial= && serial=`echo $i | cut -d= -f2`
    8887    done
    89     ln -s -f $serial /dev/tty
     88    # Doing that is only valid when using a real serial line
     89    if [ -f $serial ]; then
     90        ln -s -f $serial /dev/tty
     91    fi
    9092}
    9193
Note: See TracChangeset for help on using the changeset viewer.