Patchwork [V2,5/5] populate-volatile.sh: remove trailing whitespaces

login
register
mail settings
Submitter Qi.Chen@windriver.com
Date Feb. 20, 2013, 5:55 a.m.
Message ID <fc06c499d04a1cf82c2d426c17cd2331a6bf718d.1361338900.git.Qi.Chen@windriver.com>
Download mbox | patch
Permalink /patch/44899/
State Accepted
Commit 082dca6f73858581863f103b467ff73cebe2c0da
Headers show

Comments

Qi.Chen@windriver.com - Feb. 20, 2013, 5:55 a.m.
From: Chen Qi <Qi.Chen@windriver.com>

Remove trailing whitespaces.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 .../initscripts-1.0/populate-volatile.sh           |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Bernhard Reutner-Fischer - Feb. 20, 2013, 2:19 p.m.
On 20 February 2013 06:55,  <Qi.Chen@windriver.com> wrote:
> From: Chen Qi <Qi.Chen@windriver.com>
>
> Remove trailing whitespaces.
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>  .../initscripts-1.0/populate-volatile.sh           |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
> index 24daeb4..d7937b4 100755
> --- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
> +++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
> @@ -48,9 +48,9 @@ create_file() {
>  }
>
>  mk_dir() {
> -       EXEC="
> -       mkdir -p \"$1\";
> -       chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
> +       EXEC="
> +       mkdir -p \"$1\";
> +       chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
>         chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 "
>
>         test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build

Don't you need ${ROOT_DIR}/etc/volatile.cache.build here (and
everywhere else if there are other cases), too?
Qi.Chen@windriver.com - Feb. 21, 2013, 2:31 a.m.
On 02/20/2013 10:19 PM, Bernhard Reutner-Fischer wrote:
> On 20 February 2013 06:55,  <Qi.Chen@windriver.com> wrote:
>> From: Chen Qi <Qi.Chen@windriver.com>
>>
>> Remove trailing whitespaces.
>>
>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>> ---
>>   .../initscripts-1.0/populate-volatile.sh           |    6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
>> index 24daeb4..d7937b4 100755
>> --- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
>> +++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
>> @@ -48,9 +48,9 @@ create_file() {
>>   }
>>
>>   mk_dir() {
>> -       EXEC="
>> -       mkdir -p \"$1\";
>> -       chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
>> +       EXEC="
>> +       mkdir -p \"$1\";
>> +       chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
>>          chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 "
>>
>>          test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build
> Don't you need ${ROOT_DIR}/etc/volatile.cache.build here (and
> everywhere else if there are other cases), too?
>
>
Actually no.

The cache is only enabled when ROOT_DIR is "/".
That is, the cache is disabled if populate-volatile.sh is run at rootfs 
time.

Best Regards,
Chen Qi
Bernhard Reutner-Fischer - Feb. 21, 2013, 7:20 a.m.
On 21 February 2013 03:31:26 ChenQi <Qi.Chen@windriver.com> wrote:

> >>          test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> 
> /etc/volatile.cache.build
> > Don't you need ${ROOT_DIR}/etc/volatile.cache.build here (and
> > everywhere else if there are other cases), too?
> >
> >
> Actually no.
>
> The cache is only enabled when ROOT_DIR is "/".
> That is, the cache is disabled if populate-volatile.sh is run at rootfs
> time.

Thanks for the explanation.
Cheers,


Sent with AquaMail for Android
http://www.aqua-mail.com

Patch

diff --git a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
index 24daeb4..d7937b4 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh
@@ -48,9 +48,9 @@  create_file() {
 }
 
 mk_dir() {
-	EXEC=" 
-	mkdir -p \"$1\"; 
-	chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1; 
+	EXEC="
+	mkdir -p \"$1\";
+	chown ${TUSER}.${TGROUP} $1 || echo \"Failed to set owner -${TUSER}- for -$1-.\" >/dev/tty0 2>&1;
 	chmod ${TMODE} $1 || echo \"Failed to set mode -${TMODE}- for -$1-.\" >/dev/tty0 2>&1 "
 
 	test "$VOLATILE_ENABLE_CACHE" = yes && echo "$EXEC" >> /etc/volatile.cache.build