Copying Matt:

* Laurie Bradshaw <bradshaw.lau...@googlemail.com> [2008-12-22 09:33]:
> I've been playing around with this, and it's not quite working,
> functions are good (thanks :) ), but the case for dns323 should go
> more like:
> 
>               elif echo "$machine" | grep -q "^D-Link DNS-323"; then
>                       INTERFACE="eth0"
>               check_file /proc/mtd
>                       rootfs=$(get_mtdblock "MTD1")
>                       if [ -n "$rootfs" ]; then
>                               path=/tmp/oldsys-preseed
>                               mkdir -p $path/rootfs
>                               mount -t minix -o ro /dev/$rootfs $path/rootfs
>                               parse_sib_conf "$path/rootfs/sib.conf"
>                               umount $path/rootfs
>                       else
>                               log "Can't find rootfs MTD partition"
>                               NET_CONFIG=dhcp
>                       fi
>                       sanity_check_static_config
>                       if [ "$NET_CONFIG" != "static" ]; then
>                               IPADDRESS=192.168.0.32
>                               NETMASK=255.255.255.0
>                               GATEWAY=192.168.0.1
>                               [ -z "$NAMESERVERS" ] && NAMESERVERS=192.168.0.1
>                               dhcp_fallback $FILE
>                       fi
> 
> so that it can fall back to dhcp in the event of failing to read
> settings, and also fallback to the static address if no dhcp server is
> available. I've tested the above code with and without a dhcp server
> available, both with static and dhcp configuration in sib.conf, and
> even with MTD1 renamed so it can't be found - it gets the network up
> one way or another for all cases. :)
> 

-- 
Martin Michlmayr
http://www.cyrius.com/



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to