Openembedded Devel Discussions
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: <openembedded-devel@lists.openembedded.org>
Subject: Re: [PATCH 02/14] autofs: add bash to RDEPENDS_autofs
Date: Fri, 12 Sep 2014 21:01:11 +0800	[thread overview]
Message-ID: <5412EE97.4040902@windriver.com> (raw)
In-Reply-To: <5412EDC0.8090000@topic.nl>



On 09/12/2014 08:57 PM, Mike  wrote:
> On 09/11/2014 05:28 PM, Robert Yang wrote:
>>
>>
>> On 09/11/2014 01:08 AM, Mike Looijmans wrote:
>>> Wouldn't it be a LOT more constructive to fix the bashism. I fail to
>>> see the
>>> virtue in adding 2MB of "bash" to an embedded system just for a text echo
>>> statement that no-one will actually read unless they hook up a serial
>>> console to
>>> their TV set or so.
>>
>> The problem is that there are more bashism, here is the full list:
>>
>> possible bashism in autofs/etc/init.d/autofs line 39 ('function' is
>> useless):
>> function start() {
>> possible bashism in autofs/etc/init.d/autofs line 52 ([^] should be [!]):
>>          elif ([ -f /proc/modules ] && lsmod) | grep -q autofs[^4]
>> possible bashism in autofs/etc/init.d/autofs line 88 ('function' is
>> useless):
>> function stop() {
>> possible bashism in autofs/etc/init.d/autofs line 89 ($"foo" should be
>> eval_gettext "foo"):
>>          echo -n $"Stopping $prog: "
>> possible bashism in autofs/etc/init.d/autofs line 92 (should be >word
>> 2>&1):
>>                  killall -TERM $prog >& /dev/null
>> possible bashism in autofs/etc/init.d/autofs line 105 ('function' is
>> useless):
>> function restart() {
>> possible bashism in autofs/etc/init.d/autofs line 113 ('function' is
>> useless):
>> function reload() {
>> possible bashism in autofs/etc/init.d/autofs line 116 ($"foo" should be
>> eval_gettext "foo"):
>>                  echo $"$prog not running"
>> possible bashism in autofs/etc/init.d/autofs line 120 ($"foo" should be
>> eval_gettext "foo"):
>>                  echo $"Reloading maps"
>> possible bashism in autofs/etc/init.d/autofs line 150 ($"foo" should be
>> eval_gettext "foo"):
>>                  echo $"Usage: $0
>> {start|forcestart|stop|restart|forcerestart|reload}"
>>
>> // Robert
>>
>
> I put the following in a bbappend to work around the bashism, this was enough to
> make the scripts work just fine with busybox's shell:

Good, thanks, I will update it with your signed-off.

// Robert

>
>
> # Remove bash scripting from init script (meaning, remove "function"
> # from each shell function)
> do_configure_prepend () {
>      for bashfile in redhat/autofs.init.in samples/rc.autofs.in
>      do
>          sed -i 's.#!/bin/bash.#!/bin/sh.' $bashfile
>          sed -i 's/^function //g' $bashfile
>      done
> }
>
>
> I wanted to point to the commit on sourceforge, but the site is unresponsive at
> the moment.
>
>>>
>>>
>>> On 9-9-2014 18:27, Robert Yang wrote:
>>>> Bashism:
>>>> [snip]
>>>> possible bashism in autofs/etc/init.d/autofs line 116 ($"foo" should be
>>>> eval_gettext "foo"):
>>>>                  echo $"$prog not running"
>>>> possible bashism in autofs/etc/init.d/autofs line 120 ($"foo" should be
>>>> eval_gettext "foo"):
>>>>                  echo $"Reloading maps"
>>>> possible bashism in autofs/etc/init.d/autofs line 150 ($"foo" should be
>>>> eval_gettext "foo"):
>>>>                  echo $"Usage: $0
>>>> {start|forcestart|stop|restart|forcerestart|reload}"
>>>> [snip]
>>>>
>>>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>>>> ---
>>>>   .../recipes-daemons/autofs/autofs_5.1.0.bb         |    1 +
>>>>   1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/meta-networking/recipes-daemons/autofs/autofs_5.1.0.bb
>>>> b/meta-networking/recipes-daemons/autofs/autofs_5.1.0.bb
>>>> index aab2187..06ee77b 100644
>>>> --- a/meta-networking/recipes-daemons/autofs/autofs_5.1.0.bb
>>>> +++ b/meta-networking/recipes-daemons/autofs/autofs_5.1.0.bb
>>>> @@ -4,6 +4,7 @@ LICENSE = "GPL-2.0"
>>>>   LIC_FILES_CHKSUM =
>>>> "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
>>>>
>>>>   DEPENDS += "libtirpc flex-native bison-native"
>>>> +RDEPENDS_${PN} += "bash"
>>>>
>>>>   inherit autotools-brokensep systemd
>>>>
>>>>
>>>
>>>
>
>


  reply	other threads:[~2014-09-12 13:01 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-09 16:27 [PATCH 00/14 V2] fix RDEPENDS issues Robert Yang
2014-09-09 16:27 ` [PATCH 01/14] aoetools: no bashism in aoe-stat Robert Yang
2014-09-09 16:27 ` [PATCH 02/14] autofs: add bash to RDEPENDS_autofs Robert Yang
2014-09-10 17:08   ` Mike Looijmans
2014-09-11 15:28     ` Robert Yang
2014-09-12 12:57       ` Mike Looijmans
2014-09-12 13:01         ` Robert Yang [this message]
2014-09-14  4:13         ` Robert Yang
2014-09-15 14:03           ` Mike Looijmans
2014-09-11 16:02   ` Enrico Scholz
2014-09-09 16:27 ` [PATCH 03/14] arptables: add bash to RDEPENDS_arptables Robert Yang
2014-09-09 16:27 ` [PATCH 04/14] ndisc6: add perl to RDEPENDS_ndisc6-misc Robert Yang
2014-09-09 16:27 ` [PATCH 05/14] stunnel: add perl to RDEPENDS_stunnel Robert Yang
2014-09-09 16:27 ` [PATCH 06/14] proftpd: add perl to RDEPENDS_proftpd Robert Yang
2014-09-09 16:27 ` [PATCH 07/14] memcached: add bash to RDEPENDS_memcached Robert Yang
2014-09-09 16:27 ` [PATCH 08/14] phpmyadmin: add bash to RDEPENDS_phpmyadmin Robert Yang
2014-09-09 16:27 ` [PATCH 09/14] apache2: split apache2-scripts subpkg Robert Yang
2014-09-09 16:27 ` [PATCH 10/14] sg3-utils: add bash to RDEPENDS_sg3-utils Robert Yang
2014-09-09 16:27 ` [PATCH 11/14] sdparm: split sdparm-scripts subpkg Robert Yang
2014-09-09 16:27 ` [PATCH 12/14] bonnie++: add perl to RDEPENDS_bonnie-scripts Robert Yang
2014-09-09 16:27 ` [PATCH 13/14] rrdtool: use rrdtool rather than PN Robert Yang
2014-09-09 16:27 ` [PATCH 14/14] webmin: fix hardcode of python2.3 Robert Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5412EE97.4040902@windriver.com \
    --to=liezhi.yang@windriver.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox