From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mediacenter.hi.pengutronix.de ([2001:6f8:1178:2::65]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1ROBeb-0005CA-C5 for ptxdist@pengutronix.de; Wed, 09 Nov 2011 18:09:37 +0100 Received: from mol by mediacenter.hi.pengutronix.de with local (Exim 4.72) (envelope-from ) id 1ROBeb-000050-BC for ptxdist@pengutronix.de; Wed, 09 Nov 2011 18:09:37 +0100 Date: Wed, 9 Nov 2011 18:09:37 +0100 From: Michael Olbrich Message-ID: <20111109170937.GC10633@pengutronix.de> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Subject: Re: [ptxdist] installing different config files for lighttpd depending on some config variable Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de On Wed, Nov 09, 2011 at 01:26:48PM +0100, Alexander Dahl wrote: > we build or BSP in different configurations depending on some options > in the menuconfig, see: > = > choice > prompt "Vendor name " > = > config VENDOR_FOO > bool > prompt "foo" > = > config VENDOR_BAR > bool > prompt "bar" > = > config VENDOR_BAZ > bool > prompt "baz" > = > endchoice > = > This is evaluated in several rules and in combination with collections > works quite well. In all configurations we use lighttpd as webserver, > previously with equal lighttpd.conf, but now we need different webserver > configs for each vendor/collection. > = > I could copy the rules/lighttpd.make from ptxdist distribution to our > BSP now and adapt it, but this would require manual attention on merging > both with each migration to a new ptxdist release and I'd like to avoid > that. = > = > I came across the possibility of postinst/preinst scripts in > targetinstall stage and assume I could use this. A preinst script would > populate projectroot/etc/lighttpd/lighttpd.conf with the right config > just before install_alternative() is called inside the distributed rule. > = > If this is a reasonable idea, where do I find documentation to these > preinst/postinst stuff? The =BBDon't Panic=AB guide doesn't cover this > topic. :-/ Thre pre-/postinst scripts are run when installing the ipkg, not before targetistall. It't not very nice but what about this: -------- /etc/lighttpd/lighttpd.conf ----------- include "real-lighttpd.conf" ------------------------------------------------ and install real-lighttpd.conf in a local package depending on VENDOR_* Michael -- = Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | -- = ptxdist mailing list ptxdist@pengutronix.de