From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.cvg.de ([62.153.82.30]) by linuxtogo.org with esmtp (Exim 4.72) (envelope-from ) id 1UFMpg-0005zm-Mb for openembedded-core@lists.openembedded.org; Tue, 12 Mar 2013 11:53:30 +0100 Received: from ensc-virt.intern.sigma-chemnitz.de (ensc-virt.intern.sigma-chemnitz.de [192.168.3.24]) by mail.cvg.de (8.14.4/8.14.4) with ESMTP id r2CAadau021771 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 12 Mar 2013 11:36:40 +0100 Received: from ensc by ensc-virt.intern.sigma-chemnitz.de with local (Exim 4.76) (envelope-from ) id 1UFMZS-0003kx-If; Tue, 12 Mar 2013 11:36:39 +0100 From: Enrico Scholz To: openembedded-core@lists.openembedded.org References: <4ad7ea263a05fb3c1960623760340549a20c849c.1363031776.git.ross.burton@intel.com> Date: Tue, 12 Mar 2013 11:36:38 +0100 In-Reply-To: <4ad7ea263a05fb3c1960623760340549a20c849c.1363031776.git.ross.burton@intel.com> (Ross Burton's message of "Mon, 11 Mar 2013 13:07:36 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Sender: Enrico Scholz X-DSPAM-Result: Innocent X-DSPAM-Probability: 0 X-DSPAM-Confidence: 1 X-Spam-Score: -6.6 X-Spam-Level: ------ X-Spam-Tests: AWL,BAYES_00,RP_MATCHES_RCVD,SPF_NEUTRAL,DSPAM_INNOCENT X-Scanned-By: MIMEDefang 2.73 Cc: Ross Burton Subject: Re: [PATCH 6/9] systemd: allow postinsts to run without systemd being present X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Mar 2013 10:53:32 -0000 Content-Type: text/plain Ross Burton writes: > These fragments may be used on a system that didn't actually boot with > systemd, so check for systemctl first, and don't force systemd to be > installed. Checking for existence of programs in scriplets is a bad hack which might hide real problems and the scriplets are getting more complicated by this. Placing scriplets and related files into separate subpackages is a much cleaner solution. > +if which systemctl >/dev/null; then check with the shell builtin 'type $prog' is more portable and does not require the external 'which' program. Enrico