From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 915B7E00BF0; Sun, 15 Jun 2014 03:26:40 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=ham version=3.3.1 X-Spam-HAM-Report: Received: from www.dynamicdevices.co.uk (www.dynamicdevices.co.uk [89.200.136.37]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id D6C96E00AE4 for ; Sun, 15 Jun 2014 03:26:37 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by www.dynamicdevices.co.uk (Postfix) with ESMTP id 888B727E030 for ; Sun, 15 Jun 2014 10:26:36 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at lennoab2.miniserver.com Received: from www.dynamicdevices.co.uk ([127.0.0.1]) by localhost (www.dynamicdevices.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Kc1qnN3sgAcx for ; Sun, 15 Jun 2014 10:26:35 +0000 (UTC) Received: from [127.0.0.1] (cpc32-live22-2-0-cust59.17-2.cable.virginm.net [82.36.253.60]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by www.dynamicdevices.co.uk (Postfix) with ESMTPSA id 5157927E02A for ; Sun, 15 Jun 2014 10:26:35 +0000 (UTC) Message-ID: <539D74D7.8080809@dynamicdevices.co.uk> Date: Sun, 15 Jun 2014 11:26:31 +0100 From: Alex J Lennon User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Yocto References: <539D7379.5000907@dynamicdevices.co.uk> In-Reply-To: <539D7379.5000907@dynamicdevices.co.uk> X-Enigmail-Version: 1.6 Subject: Re: Autotools, Init Script templates and configure.ac X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jun 2014 10:26:40 -0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 15/06/2014 11:20, Alex J Lennon wrote: > Hi all, > > Script Installation - > > I've been looking at autotools recipes and from the various > examples/tutorials I've seen there > doesn't appear to be a baked-in way of using and installing initscripts > on different platforms. > > The recommendation I eventually went with was something like this in > Makefile.am > > install-data-hook: > update-rc.d pi-blaster.boot.sh defaults > $(init_ddir)/pi-blaster.boot.sh start > > uninstall-hook: > update-rc.d pi-blaster.boot.sh remove > killall pi-blaster > > update-rc.d doesn't seem to account for the sysroot properly, even if I > add $(sysconfdir)/init.d and > I'm wondering if there is a better, best practice, way to handle script > installation with Autotools such > that Yocto is happy without patches? > > (I also had a look at adding -r into update-rc.d but I am guessing there > is a better, more host transparent, > way I should be using?) > > Script Templates - > > A few times now I have encountered init scripts which assume LSB > functions are present. I've patched > these so they work with Yocto images without LSB. I am aware that there > is a LSB image for Yocto but > I don't use it. > > I have hunted around and seen many and varied init script templates, but > can anybody recommend > a "gold standard" init script that would work happily either in a Yocto > image with no LSB or make > use of LSB functions when present. > > I'd like to standardise on and use such a script moving forward. > I should perhaps add that I've been using the Yocto update-rc.d bbclass very happily. I can patch out the autotools hooks in Makefile.am and my recipe will work fine. What I'm not understanding is if there's a standardised way to write the autotools configuration that would eliminate the need for Yocto update-rc.d Thanks, Alex