From: ChenQi <Qi.Chen@windriver.com>
To: Saul Wold <sgw@linux.intel.com>
Cc: Zhenfeng.Zhao@windriver.com, openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/1] sysvinit: start .sh scripts correctly
Date: Tue, 26 Feb 2013 10:45:51 +0800 [thread overview]
Message-ID: <512C21DF.7010700@windriver.com> (raw)
In-Reply-To: <512C1725.80906@linux.intel.com>
On 02/26/2013 10:00 AM, Saul Wold wrote:
> On 02/25/2013 05:39 PM, Qi.Chen@windriver.com wrote:
>> From: Chen Qi <Qi.Chen@windriver.com>
>>
>> Previously, scripts which end with '.sh' were sourced, so the arguments
>> like 'start' and 'stop' were just ignored.
>>
>> This resulted in some init scripts not being able to start correctly.
>> For example, sourcing hwclock.sh in busybox actually does nothing.
>> It should be invoked as 'hwclock.sh start' or 'hwclock.sh stop'.
>>
>> This patch fixes this issue.
>>
>> [YOCTO #3612]
>>
>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>> ---
>> meta/recipes-core/sysvinit/sysvinit/rc | 16 +---------------
>> 1 file changed, 1 insertion(+), 15 deletions(-)
>>
>> diff --git a/meta/recipes-core/sysvinit/sysvinit/rc
>> b/meta/recipes-core/sysvinit/sysvinit/rc
>> index 44bc9bf..50951da 100755
>> --- a/meta/recipes-core/sysvinit/sysvinit/rc
>> +++ b/meta/recipes-core/sysvinit/sysvinit/rc
>> @@ -41,21 +41,7 @@ startup_progress() {
>> startup() {
>> # Handle verbosity
>> [ "$VERBOSE" = very ] && echo "INIT: Running $@..."
>> -
>> - case "$1" in
>> - *.sh)
>> - # Source shell script for speed.
>> - (
>> - trap - INT QUIT TSTP
>
> Are you sure you don't want the trap still? I realize this reset it
> to default..
>
Yes.
Code snippet from rc:
# Ignore CTRL-C only in this shell, so we can interrupt subprocesses.
trap ":" INT QUIT TSTP
So these signals are ignored in rc but passed on to subprocesses.
And the reset is not needed.
If in rc we use
trap "" INIT QUIT TSTP
then the reset is needed.
Best Regards,
Chen Qi
> Sau!
>
>> - scriptname=$1
>> - shift
>> - . $scriptname
>> - )
>> - ;;
>> - *)
>> - "$@"
>> - ;;
>> - esac
>> + "$@"
>> startup_progress
>> }
>>
>>
>
>
next prev parent reply other threads:[~2013-02-26 3:02 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 [this message]
2013-02-26 11:04 ` Burton, Ross
2013-02-27 3:26 ` ChenQi
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=512C21DF.7010700@windriver.com \
--to=qi.chen@windriver.com \
--cc=Zhenfeng.Zhao@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=sgw@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox