Changeset 211

Show
Ignore:
Timestamp:
02/20/07 11:04:22 (2 years ago)
Author:
ludo
Message:

static ip option for CDROM boot. (from r4040)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/client/revimage/autorestore/revoboot

    r197 r211  
    1616# if CDROM boot, then be less patient 
    1717grep -q revocdrom /etc/cmdline && MAXSEC=5 
     18# CDROM + static ip mode 
     19grep -q revocdromstatic /etc/cmdline && staticip 
    1820 
    1921# check if eth0 is up 
     
    7072    NM=255.255.255.0 
    7173    while true; do 
    72         whiptail --title "Static IP" --backtitle "Linbox Rescue Server" --inputbox "Please enter the IP address below" 10 70 "$IP" 2>/tmp/res 
     74        whiptail --title "Static IP" --backtitle "Linbox Rescue Server" --inputbox "Please enter the IP address:" 10 70 "$IP" 2>/tmp/res 
    7375        IP=`cat /tmp/res` 
    74         whiptail --title "Static IP" --backtitle "Linbox Rescue Server" --inputbox "Please enter the netmask below" 10 70 "$NM" 2>/tmp/res 
     76        whiptail --title "Static IP" --backtitle "Linbox Rescue Server" --inputbox "Please enter the netmask:" 10 70 "$NM" 2>/tmp/res 
    7577        NM=`cat /tmp/res` 
    7678        DEFGW=`echo $IP|cut -d. -f1-3`".1" 
    77         whiptail --title "Static IP" --backtitle "Linbox Rescue Server" --inputbox "Please enter the default gateway below" 10 70 "$DEFGW" 2>/tmp/res 
     79        whiptail --title "Static IP" --backtitle "Linbox Rescue Server" --inputbox "Please enter the default gateway:" 10 70 "$DEFGW" 2>/tmp/res 
    7880        GW=`cat /tmp/res` 
    79         whiptail --title "Static IP" --backtitle "Linbox Rescue Server" --inputbox "Please enter the LRS IP address below" 10 70 "$DEFGW" 2>/tmp/res 
     81        whiptail --title "Static IP" --backtitle "Linbox Rescue Server" --inputbox "Please enter the LRS IP address:" 10 70 "$DEFGW" 2>/tmp/res 
    8082        LRS=`cat /tmp/res` 
    8183        ifconfig $ETH $IP netmask $NM 
    8284        route add default gw $DEFGW 
     85        sleep 5 
    8386        ping -c 1 $LRS >/dev/null && break  
    8487        wecho "Cannot reach \"$LRS\". Please check the network configuration again." 
     
    238241        # check if this action can be done 
    239242        [ "$CMDLINE" ] && break 
    240         wechow "Sorry this entry can only be used with a PXE boot.\n\nBecause you are booting from a CDROM, not all LRS features are available. To set-up a PXE network boot, please refer the the LRS manual." 
     243        wechow "Sorry this entry can only be used with a PXE boot.\nBecause you are booting from a CDROM, some LRS features are not available. To set-up PXE network boot, please refer to the LRS manual." 
    241244    done 
    242245    # fake /proc/cmdline  
     
    340343if grep -q revosavedir /etc/cmdline ;then 
    341344    # launch initial pre-inst scripts 
    342     do_pre_inst     
     345    [ -x /bin/postmount ] && do_pre_inst     
    343346    # Now backup/restore     
    344347    if grep -q revorestore /etc/cmdline ;then 
     
    351354# Postinstall  
    352355if grep -q revopost /etc/cmdline ; then 
    353     do_postinst 
     356    [ -x /bin/postmount ] && do_postinst 
    354357fi 
    355358