Re: [OE-core] [master][pyro][PATCH] image-vm: Avoid use of fold, tac and paste commands for DISK_SIGNATURE

2017-06-08 Thread Burton, Ross
On 8 June 2017 at 12:21, Jonathan Liu  wrote:

> For example:
> $ echo $(false)
>
> $ echo $?
> 0
>

I stand corrected.  Thanks, sh.

Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [master][pyro][PATCH] image-vm: Avoid use of fold, tac and paste commands for DISK_SIGNATURE

2017-06-08 Thread Jonathan Liu
Hi Ross,

It is the shell not awk.

For example:
$ echo $(false)

$ echo $?
0

Regards,
Jonathan

On 8 June 2017 at 21:18, Burton, Ross  wrote:
>
> On 8 June 2017 at 12:07, Jonathan Liu  wrote:
>>
>> These commands are not whitelisted by the HOSTTOOLS variable which
>> silently prevents the MBR disk signature from being written to the
>> image.
>
>
> Silently, ouch.  Thanks, awk.
>
> Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [master][pyro][PATCH] image-vm: Avoid use of fold, tac and paste commands for DISK_SIGNATURE

2017-06-08 Thread Burton, Ross
On 8 June 2017 at 12:07, Jonathan Liu  wrote:

> These commands are not whitelisted by the HOSTTOOLS variable which
> silently prevents the MBR disk signature from being written to the
> image.
>

Silently, ouch.  Thanks, awk.

Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [master][pyro][PATCH] image-vm: Avoid use of fold, tac and paste commands for DISK_SIGNATURE

2017-06-08 Thread Jonathan Liu
These commands are not whitelisted by the HOSTTOOLS variable which
silently prevents the MBR disk signature from being written to the
image.

Reported-by: Michael Davis 
Signed-off-by: Jonathan Liu 
---
 meta/classes/image-vm.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/image-vm.bbclass b/meta/classes/image-vm.bbclass
index 35c9244e9b..98bd92000e 100644
--- a/meta/classes/image-vm.bbclass
+++ b/meta/classes/image-vm.bbclass
@@ -93,7 +93,7 @@ build_boot_dd() {
 
parted $IMAGE print
 
-   awk "BEGIN { printf \"$(echo ${DISK_SIGNATURE} | fold -w 2 | tac | 
paste -sd '' | sed 's/\(..\)/\\x&/g')\" }" | \
+   awk "BEGIN { printf \"$(echo ${DISK_SIGNATURE} | sed 
's/\(..\)\(..\)\(..\)\(..\)/\\x\4\\x\3\\x\2\\x\1/')\" }" | \
dd of=$IMAGE bs=1 seek=440 conv=notrunc
 
OFFSET=`expr $END2 / 512`
-- 
2.12.2

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core