[BusyBox] default config for ifup???

Steven Scholz steven.scholz at imc-berlin.de
Thu Feb 6 01:53:03 UTC 2003


Uwe Beutin schrieb:
> On Wed, 5 Feb 2003, Steven Scholz wrote:
> 
> 
>>For now I hav esomething like
>>...
>>. /etc/sysconfig/network-scripts/ifcfg-eth0
>>if [ "${BOOTPROTO}" = bootp -o "${BOOTPROTO}" = dhcp ]; then
>>echo -n "Determining IP information for $DEVICE..."
>>     if /sbin/udhcpc -n -q -s /etc/dhcpc/default.script; then
>>        echo " done."
>>     else
>>        echo " failed! Using defaults settings (IPADDR=$IPADDR)..."
>>        /sbin/ifconfig eth0 $IPADDR  broadcast $BROADCAST netmask $NETMASK
>>     fi
>>...
>>
>>in my /etc/rc.sh.
>>
>>But I would actually prefer using ip tools and just have a
>>
>>/sbin/ifup eth0
>>
>>in the start script...
> 
> 
> Perhaps you should just create a
> /etc/sysconfig/network-scripts/ifcfg-eth1 with the corresponding entries
> for if-up to work?!
> 
> DEVICE="eth1"
> BOOTPROTO="none"
> BROADCAST="..."
> IPADDR="..."
> NETMASK="..."
> NETWORK="..."
> ONBOOT="no"
> ...

How would that serve my wishes?

The above mentioned way reads the config from 
/etc/sysconfig/network-scripts/ifcfg-eth0 then tries to use udhcpc to get an IP 
and if that fails it uses values in  /etc/sysconfig/network-scripts/ifcfg-eth0 
to configure the interface.

Now, if I have an /etc/network/interfaces like

iface eth0 inet dhcp
address 10.0.9.153
netmask 255.255.0.0
network 10.0.0.0
broadcast 10.0.255.255

and use "sbin/ifup eth0" it will try to use dhcp and if it fails it just give up!

So I am not sure what you meant.

Steven







More information about the busybox mailing list