[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] rc.conf and network initialization

From: Stuart Hughes
Subject: Re: [Ltib] rc.conf and network initialization
Date: Wed, 19 May 2010 17:22:04 +0100
User-agent: Thunderbird (X11/20080707)

Hi Chris,

Normally configuration is done at build time using ./ltib -m config

This sets up rootfs/etc/rc.d/rc.conf which controls the network startup

If you look in there you will see something like:

export INTERFACE0="eth0"
export IPADDR0="dhcp"

To change at runtime, you'll need to edit this file (maybe with sed).
If you default to DHCP, then at a minimum, you'll have to add a netmask.
So, for example, say we started with DHCP like above.  Edit rc.conf to
read (change as appropriate to your network):

export INTERFACE0="eth0"
export IPADDR0="dhcp"
export NETMASK0=""

to switch to static IP, run sed (or manually edit) and change to (for

export INTERFACE0="eth0"
export IPADDR0=""
export NETMASK0=""

Then re-start networking on the target:

# sh /etc/rc.d/rcS restart network

To revert to DHCP, re-edit rc.conf, change IPADDR0 back to dhcp and
re-start the network.


* If you're mounted NFS root, it will ignore a change back to DHCP
* You may also want to add values for the static case for
* I've not tested this much, so you may need to debug

Regards, Stuart

Chris Westervelt wrote:
> Does anyone know what needs to be done to satisfy
> /etc/rc.d/init.d/network start or restart to allow for a change between
> ‘static’ and ‘dhcp’ configurations to take place after the system is up
> and running.  My product needs to be able to change this on the fly. 
> When I /etc/rc.d/init.d/network start/restart I get an error about
> IPADDR not set in rc.conf.  I have not found any syntax about IPADDR in
> any wiki on rc.conf.  Only ifconfig_xxN which is also a mystery as to
> where the  xxN comes from if we don’t have an /etc/network/ifconfig.conf
> file or something like this or do we? 
> *Chris Westervelt*
> *Senior Product Development Engineer*
> *Infrasafe, Inc.
> 12612 Challenger Pkwy
> Suite 300
> Orlando, FL
> 32826*
> * <>
> Office:   (407) 926-6983*
> *Mobile: (407) 595-7023       
> Fax:    (407) 857-1635*
> *Notice of Confidentiality:*
> This e-mail communication and the attachments hereto, if any, are
> intended solely for the information and use of the addressee(s)
> identified above and may contain information which is legally privileged
> and/or otherwise confidential. If a recipient of this e-mail
> communication is not an addressee (or an authorized representative of an
> addressee), such recipient is hereby advised that any review,
> disclosure, reproduction, re-transmission or other dissemination or use
> of this e-mail communication (or any information contained herein) is
> strictly prohibited. If you are not an addressee and have received this
> e-mail communication in error, please advise the sender of that
> circumstance either by reply e-mail or by telephone at (800) 238-2686,
> immediately delete this e-mail communication from any computer and
> destroy all physical copies of same.**
> ------------------------------------------------------------------------
> _______________________________________________
> LTIB home page:
> Ltib mailing list
> address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]