[oe-commits] [openembedded-core] branch pyro updated: image-vm: Avoid use of fold, tac and paste commands for DISK_SIGNATURE
git at git.openembedded.org
git at git.openembedded.org
Mon Jun 12 16:02:53 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch pyro
in repository openembedded-core.
The following commit(s) were added to refs/heads/pyro by this push:
new 5527af6 image-vm: Avoid use of fold, tac and paste commands for DISK_SIGNATURE
5527af6 is described below
commit 5527af688f6ccaacd7ec24d29425d0c007d5341c
Author: Jonathan Liu <net147 at gmail.com>
AuthorDate: Thu Jun 8 21:07:54 2017 +1000
image-vm: Avoid use of fold, tac and paste commands for DISK_SIGNATURE
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 <michael.davis at essvote.com>
Signed-off-by: Jonathan Liu <net147 at gmail.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
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 35c9244..98bd920 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`
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list