From: ChenQi <Qi.Chen@windriver.com>
To: "Burton, Ross" <ross.burton@intel.com>
Cc: Zhenfeng.Zhao@windriver.com, openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/1] sysvinit: start .sh scripts correctly
Date: Wed, 27 Feb 2013 11:26:38 +0800 [thread overview]
Message-ID: <512D7CEE.3090600@windriver.com> (raw)
In-Reply-To: <CAJTo0LbKDQNM2V02fsqBCG_RrBc517yGwVSBLi5nSnwFvs-_bw@mail.gmail.com>
On 02/26/2013 07:04 PM, Burton, Ross wrote:
> On 26 February 2013 01:39, <Qi.Chen@windriver.com> wrote:
>> -
>> - case "$1" in
>> - *.sh)
>> - # Source shell script for speed.
>> - (
>> - trap - INT QUIT TSTP
>> - scriptname=$1
>> - shift
>> - . $scriptname
>> - )
>> - ;;
>> - *)
>> - "$@"
>> - ;;
>> - esac
>> + "$@"
>> startup_progress
>> }
> NACK.
>
> By "fix" you mean "remove the tested and proven optimisation"? The "if
> .sh use ." test was designed to speed up booting by not forking a new
> bash, and it's been demonstrated to have a noticeable difference on
> slower hardware.
>
> You can pass arguments to "." as this little test demonstrates:
>
> $ cat service.sh
> echo My arguments are "$@"
> $ . service.sh foo bar
> My arguments are foo bar
>
> The "shift" command shows that passing the arguments to the script was
> the intention, and a few lines of micro-test demonstrate that it
> *should* work:
>
> $ cat rc.sh
> startup() {
> scriptname=$1
> shift
> . $scriptname
> }
> startup ./service.sh start
> $ busybox sh ./rc.sh
> My arguments are start
>
> So, something else is going wrong.
>
> Ross
>
>
Yes, you're right.
I absolutely made a mistake.
Thank you for pointing it out.
Best Regards,
Chen Qi
prev parent reply other threads:[~2013-02-27 3:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-26 1:39 [PATCH 0/1] sysvinit: start .sh scripts correctly Qi.Chen
2013-02-26 1:39 ` [PATCH 1/1] " Qi.Chen
2013-02-26 2:00 ` Saul Wold
2013-02-26 2:45 ` ChenQi
2013-02-26 11:04 ` Burton, Ross
2013-02-27 3:26 ` ChenQi [this message]
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=512D7CEE.3090600@windriver.com \
--to=qi.chen@windriver.com \
--cc=Zhenfeng.Zhao@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=ross.burton@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.