@ Ithamar 

Thank you. That is well understood.
However, when you write a script to automate a router configuration that
should be working cross platform, then you cannot preconfigure the wireless
configuration with a static file. First you cannot make assumptions about
the hardware present, it could be anything, so you have to allow the system
to go through the process of discovery it goes through, when first writing
the /etc/config/wireless file. You would also loose router specific
configuration, as for the nanostation, or for the various profiles for the
ar71xx chipset. You actually want to take up what was preconfigured there,
and add, but not remove as you would loose the benefit of the device
specific configuration. Consequently a process running after
/etc/config/network boot is what is required.

@ Jo-Philip
The process triggered in /etc/init.d/boot is a great pointer. Thank You. I
am toying with the thought of adding a boot command in one of my own
start-up scripts, like 
/etc/init.d/xyz boot
Could I just confirm when the init scripts triggered by boot are running:
Does the system first run through all boot commands and then through all
start commands or does the system run through all scripts in the order given
in /etc/rc.d running the boot command first and then the start command for
each init script in turn? Please advise.

Thank You


-----Original Message-----
From: openwrt-devel-boun...@lists.openwrt.org
[mailto:openwrt-devel-boun...@lists.openwrt.org] On Behalf Of Ithamar R.
Adema
Sent: Saturday, 29 January 2011 1:47 a.m.
To: OpenWrt Development List
Subject: Re: [OpenWrt-Devel] Clean way of adding custom scripts and firstrun

On Fri, 2011-01-28 at 11:28 +1300, Hanno Schupp wrote:
> I am asking as some configuration like network and wireless may be set
> by the system on boot, so if one would like to add to
> the /etc/config/wireless configuration (i.e. by setting the power to
> max possible or, setting diversity etc.) then this is not possible, as
> the /etc/config/wireless file does not exist before /etc/init.d
> scripts are fired. So this means one would be looking for a
> first-boot-script facility that is triggered after /etc/init.d is all
> completed.  Does this facility exist? 

For the example of the wireless configuration file, it will not be
generated if it already exists. So if you need to preconfigure it, you
could write it out in the uci-defaults script and have the network
init.d script pick the generated configuration up and use it.

HTH,

Ithamar.


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to