Hi, In the current approach there is an inherent limitation in that the uci-default scripts run before the application init.d scripts are run. While this is desirable for many situations, it is an issue in those cases you need to have the network up, switch recognised, wifi driver identified etc.
To overcome we have used the uci-default approach and copied into a uci-postconfig directory in our firmware compilation. All scripts in there are also just run once, but AFTER all other scripts have been run before the last finished script that marks the end of the boot process. The scripts in uci-postconfig directory are called and then removed after execution by an ordinary init.d script with S99 timing. While that all works well, it would be nice to have such a postconfig or postboot mechanism (whatever you want to call it) in standard OpenWrt as much as the uci-default mechansim. Just a thought... Hanno On 11 August 2011 20:40, Ithamar R. Adema <ithamar.ad...@team-embedded.nl>wrote: > Hi Lukas, > > On Thu, 2011-08-11 at 08:13 +0200, Lukas Macura wrote: > > > > So, I really do not want to SPAM on this conference, but my question > > is: > > > > - Should OpenWrt take care of this scenarios? Or it is package > > specific and every package which needs things like this should do it > > by itself? > > > > There are four scenarios and we want to choose best one: > > > > - implement it in application by its way > > - implement some delayed postinst in opkg (sounds like bigger hack) > > - implement using hook to firstboot() (but in that case, it will not > > work as module) > > - create some /lib/postinst.sh with functions like was_run() , > > [snip] > > Again, any script in /etc/uci-defaults gets executed on bootup before > any of the packages installed are started. After the scripts > in /etc/uci-defaults are finished, they are deleted, never to be run > again. > > This seems like what you are proposing here in your 3rd item in the list > above, but it is already there :) > > These scripts can perform anything you like, including starting up > another process that you require during that script. There's nothing > specific to UCI there, except that the boot process is far enough to be > able to use uci but has not started anything further yet. > > So, is your problem that you want stuff to get triggered after ipkg > install, on an already running system, or what is the problem (sorry if > I'm too dense to pick it up from your mail :$) > > Regards, > > 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