Hi Lukas, as far as I can see, you have three options of how to overwrite package config files:
First, you can just create a "files" folder in your buildroot folder. Every file you place there will be copied over automatically right before building the image and after all packages have been built. This is a good way to replace files from packages with your own files, but doesn't help you when you just want to modify a few entries in a config file. Also, when you build your package as module and you want to install it later onto the router, that doesn't work either. Second, you can build a script into your package and have that executed the first time the device boots (/etc/ucidefaults as Chris already wrote). There you can use complex scripts that don't just overwrite other files but may instead analyze and modify them (i.e. add custom firewall rules without deleting the previous ones). This doesn't work either when you want to install your package modular, because the device already did its first boot and your script won't get executed. Third, if you want your package to modify files upon installation, you can create a post-install script, which will be executed when the package is installed on the device via opkg. But that won't work when you want to integrate your package into the firmware image. So, the way of doing highly depends of how you want your package to be installed. Hope I could help Joachim On 08/06/2011 03:47 PM, Lukas Macura wrote: > Hi to all, > > please I would want to open discussion about creating more complex > package which needs to overwrite configs of other packages. I want to > find "clean" way to do this. > > I will try to explain. We are creating BESIP (Bright Embedded Solution > for IP Telephony). Entire project is based on OpenWrt and is open. We > will give all our work to OpenWrt community back. I will inform about > some "stable" packages later here. For example, we are working on > kamailio3, yuma(netconfd), libssh, libssh2, snortsam, ipqbdb. > > Package besip consists of dependencies to other openwrt packages and > options. That's OK. But we need to overwrite some config files (like > asterisk18 configs). > > Today we are using our config tree which is part of package but is > located under /etc/besip/etcdefault/ . During boot, we added firstboot > entry which will copy needed files in right place and overwrite other > configs. Because if we make package with same config files, it is not > possible to install due to overwriting configs of other packages. > > Did somebody solved this before? Or is there some clean way to achieve this? > > Thank you for any help! > > With regards, > Lukas Macura > > _______________________________________________ > 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