[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: How to port just part of the busybox to arm
From:       Denis Vlasenko <vda.linux () googlemail ! com>
Date:       2006-11-20 18:13:24
Message-ID: 200611201913.24676.vda.linux () googlemail ! com
[Download RAW message or body]

On Monday 20 November 2006 09:07, liu.renfeng wrote:
> At last I compile it successfully, but there is another problem, when I run the \
> busybox I get the following error message: 
> [root@localhost bin]# ./busybox udhcpc
> udhcpc (v1.2.2) started
> script /usr/share/udhcpc/default.script failed: No such file or directory
> Sending discover...
> Sending select for 192.168.200.205...
> Lease of 192.168.200.205 obtained, lease time 1800
> script /usr/share/udhcpc/default.script failed: No such file or directory
> 
> I find out there really has no /usr/share/udhcpc/default.script in my system.
> I find no default.script in busybox either.  

That's because it is sort of hard to guess how to configure network
"by default" on the particular box, so udhchc correctly
gives up on doing it itself. It just sets environment variables
Example:

dhcptype=5
dns=172.16.22.2
interface=eth0
ip=172.16.42.177
lease=97200
mask=24
router=172.16.42.98
serverid=172.16.42.102
subnet=255.255.255.0

and starts specified script.

It's up to box's admin (or distro maintainer) to write the script.
For example, such line in the script:

ip a a $ip/$mask dev $interface

will configure IP address. In real life, you probably will want
to add considerable amount of paranoia:

test "$ip" || exit 1
test "$mask" || exit 1
test "$interface" || exit 1
if test "$1" = "bound"; then
    ip a a "$ip/$mask" dev "$interface"
    ...
fi

--
vda
_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic