Thank you, I definitely understand this.. It was little bit confusing for me, that uci-defaults are not related only to uci things.. Maybe another users are confused too because its name. Maybe we could use some /etc/pkg-defaults too in future.. Even if it will do same thing in practical, operations in package can be another (to set some uci things or to fill some database).
But it does not matter, solution is to use uci-defaults and in postinst, call something like this (found in fluxbox): define Package/fluxbox/postinst #!/bin/sh [ -n "$${IPKG_INSTROOT}" ] && exit . /etc/functions.sh uci_apply_defaults endef so defaults will be created even when creating image or installing into image.. Thak you and sorry for SPAM :)) Lukas Dne 11.8.2011 09:55, Ithamar R. Adema napsal(a): > 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