diff options
author | John Bowler <jbowler@nslu2-linux.org> | 2005-07-18 19:40:57 +0000 |
---|---|---|
committer | OpenEmbedded Project <openembedded-devel@lists.openembedded.org> | 2005-07-18 19:40:57 +0000 |
commit | 7279d75be5455744430a3126ab800062375b38bf (patch) | |
tree | 3c1dc1e4113e201015f9dfeb4649b1ce79a74e32 /packages/openslug-init/openslug-init-0.10/functions | |
parent | 04a269c583bc9586020846c8668d847b5de6095f (diff) |
Fix for slugbug 197. This no longer runs udhcp to get the network address
if /etc/default/sysconf has bootproto=static This affects network boot
(nfs) only - previously a DHCP address would be used in preference to the
specified static one.
All NFS root users please test this - the number of failure cases are large
and a failure may leave the system unbootable.
Diffstat (limited to 'packages/openslug-init/openslug-init-0.10/functions')
-rwxr-xr-x | packages/openslug-init/openslug-init-0.10/functions | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/packages/openslug-init/openslug-init-0.10/functions b/packages/openslug-init/openslug-init-0.10/functions index ac8e195abd..61b5eb2776 100755 --- a/packages/openslug-init/openslug-init-0.10/functions +++ b/packages/openslug-init/openslug-init-0.10/functions @@ -209,10 +209,13 @@ ifup(){ # is not left running so this will only work for # the lease length time! ifconfig "$iface" up - test -n "$hostname" && HOSTNAME="-H $hostname" - # The script writes the required shell variable assignments - # to file descriptor 9 - eval $(udhcpc -i "$iface" -n -q -r "$ip" $HOSTNAME -s /boot/udhcpc.script 9>&1 >/dev/null) + if test "$(config boot)" != static + then + test -n "$hostname" && HOSTNAME="-H $hostname" + # The script writes the required shell variable assignments + # to file descriptor 9 + eval $(udhcpc -i "$iface" -n -q -r "$ip" $HOSTNAME -s /boot/udhcpc.script 9>&1 >/dev/null) + fi test -n "$broadcast" && BROADCAST="broadcast $broadcast" test -n "$subnet" && NETMASK="netmask $subnet" |