Changeset 273 for floppyfw-3.0/scripts

Show
Ignore:
Timestamp:
07/18/11 22:04:01 (10 months ago)
Author:
root
Message:

Various fixes I should have synced earlier and one new feature (!).

Now it will attept to save and then use the last address it got from the DHCP server through reboots.

Location:
floppyfw-3.0/scripts
Files:
1 added
3 modified

Legend:

Unmodified
Added
Removed
  • floppyfw-3.0/scripts/config

    r269 r273  
    3333CONNECT_TYPE=DHCP       # For getting the IP address by DHCP, often used  
    3434                        # on cable modems. 
     35 
     36DHCP_USE_LAST_ADDR=y    # I'll make this new feature a default yes. 
     37                        # Reason is simple; I Want it and I presume 
     38                        # most others want it aswell. 
     39                        # Since it tries to store the address on the 
     40                        # root / source media, this only works with a  
     41                        # writeable source. 
     42 
    3543# CONNECT_TYPE=STATIC   # For the good old LAN/WAN connections with 
    3644                        # static IP addresses on the outside. 
  • floppyfw-3.0/scripts/network.ini

    r269 r273  
    140140                echo "Connetion method is DHCP" 
    141141                echo "OUTSIDE_DEVICE=$OUTSIDE_DEV" > /etc/outside.info 
    142                 HARGS= 
    143                 [ "$USER_IDENT" != "" ] && HARGS="-H $USER_IDENT" 
    144                 if /sbin/udhcpc -n -s /etc/udhcpcrenew.sh $HARGS -i $OUTSIDE_DEV 
     142                if /etc/udhcpc.sh 
    145143                then 
    146144                        . /etc/outside.info 
    147145                else 
    148146                        echo "duh!"     # Or some more useful error handling 
     147                        echo -n "Sorry, I could not get an IP address," 
     148                        echo -n " I'd better quit." 
     149                        exit; 
    149150                fi 
    150151                ;; 
  • floppyfw-3.0/scripts/rc.initrd

    r3 r273  
    2828while [ "$1" -a "$2" ] 
    2929do 
    30        echo "Attempting to mount $1 ($2)" 
    31        load_fsmod $1 $2 
    32        if mount -t $2 $1 /mnt/tmp 
     30       SOURCE_DEV=$1 
     31       SOURCE_FS=$2 
     32       echo "Attempting to mount $SOURCE_DEV ($SOURCE_FS)" 
     33       load_fsmod $SOURCE_DEV $SOURCE_FS 
     34       if mount -t $SOURCE_FS $SOURCE_DEV /mnt/tmp 
    3335        then 
    34          echo "Mounted $1 on /mnt/tmp" 
     36         echo "Mounted $SOURCE_DEV on /mnt/tmp" 
    3537         break 
    3638       else 
     
    153155stripcr /mnt/tmp/floppyfw.msg /etc/issue 644 
    154156 
     157# I also want to add the source device and file system so that I can remount. 
     158echo "SOURCE_DEV=$SOURCE_DEV" >> /etc/config 
     159echo "SOURCE_FS=$SOURCE_FS" >> /etc/config 
     160 
    155161# 
    156162# Before I source it I want to fix the password. It's in the config but