~ubuntu-branches/ubuntu/maverick/oldsys-preseed/maverick

« back to all changes in this revision

Viewing changes to tests/arm/thecus_dhcp.test

  • Committer: Bazaar Package Importer
  • Author(s): Martin Michlmayr
  • Date: 2009-03-09 20:21:36 UTC
  • mfrom: (2.1.4 jaunty)
  • Revision ID: james.westby@ubuntu.com-20090309202136-hao0h9jwwlaupaxr
Tags: 3.2lenny1
* Add support for the D-Link DNS-323, thanks to a patch from
  Matt Palmer.  Closes: #502821.
* Generate DHCP fallback information on the D-Link DNS-323, thanks
  Laurie Bradshaw.
* Don't use the default hostname on the D-Link DNS-323 and Conceptronic
  CH3SNAS.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
                DEFAULT_HOSTNAME=$(cut -d . -f 1 $path/defaults/app/etc/HOSTNAME)
8
8
                DEFAULT_DOMAIN=$(cut -d . -f 2- $path/defaults/app/etc/HOSTNAME)
9
9
        fi
10
 
        if [ -e $path/defaults/app/cfg/cfg_nic0 ]; then
11
 
                parse_ifconfig $path/defaults/app/cfg/cfg_nic0
12
 
                [ -n "$IPADDRESS" ] && DEFAULT_IPADDRESS=$IPADDRESS
13
 
                unset IPADDRESS NETMASK GATEWAY
14
 
        fi
15
10
fi
16
11
parse_unix_tree $path/mnt
17
12
INTERFACE=eth0
21
16
        NET_CONFIG=static
22
17
        parse_ifconfig $path/mnt/cfg/cfg_nic0
23
18
fi
24
 
# Use DHCP if the original IP from the firmware has never been changed
25
 
if [ "$IPADDRESS" = "$DEFAULT_IPADDRESS" -o "$IPADDRESS" = "192.168.1.100" ]; then
26
 
        unset NET_CONFIG
27
 
        IPADDRESS=192.168.1.100
28
 
        unset NETMASK GATEWAY
29
 
fi
 
19
sanity_check_static_config
30
20
if [ "$NET_CONFIG" != "static" ]; then
31
21
        IPADDRESS=192.168.1.100
32
22
        NETMASK=255.255.255.0