On Fri, 2009-07-03 at 23:24 -0400, Daniel Dickinson wrote:
> Why do we have uci-defaults?  Is there an advantage to this over
> simply refreshing the jffs from squashfs defaults should we
> choose to go back to defaults settings?
In my point of view - yes - see below.
> 
> When exactly do uci-defaults get applied?
During boot (take a look at /etc/rc.d/S10boot) - the function
"apply_uci_config()" is called. After applying the uci-changes files
in /etc/uci-defaults are getting deleted
> 
> Would it make sense to eliminate them?
Aas far as I got it right - no, not to me.
> 
> The reason I ask is that I am looking at unifying the means of
> configuring an OpenWRT so that all the changes that need to be
> done in one place.
> 
> E.g. for all changes that should override packages and other
> defaults use files/etc/*
> for example
You mean, overriding uci-files instead of using uci-defaults?
Sometimes you need to just modify a uci-file, when installing a package.
You don't know which combination of packages is installed on the target,
so you can't provide an appropriate uci-config-file for every case with
your package of software which is going to be installed.
Using the way of uci-defaults you can dynamically add/modify/delete
specific sections/options, without touching existing ones - provided by
other packages - within the same file. 
A concrete case where I use uci-defaults and not just simply copy
uci-files:
/etc/config/x11 - provided by Xorg in it's original form - needs to be
changed when a(nother) window-manager is getting installed, e.g. when
installing fluxbox the following section is added/modified:
        config 'desktop'
                option 'autostart' 'fluxbox_start'
The other sections, which describe settings for the X-Server (which are
e.g. target-specific (touchscreen, display-size, etc.)) are not known by
the package fluxbox and so, should not be touched or even replaced
(which would be the case, when fluxbox is providing it's own form
of /etc/config/x11).
> 
> Instead of the menuconfig configuration + files/* + whatever it
> is for defaults settings that can be overriden by packages +
> uci-defaults
> 
> It would simplify creating customized firmwares in a production
> environment.
> 
> Regards,
Hope I got your point,
> 
> Daniel
mirko
> 
> _______________________________________________
> openwrt-devel mailing list
> [email protected]
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to