base-files: format hexdump output instead of using awk for sysupgrade
authorVasilis Tsiligiannis <acinonyx@openwrt.gr>
Wed, 10 Jun 2009 21:52:07 +0000 (21:52 +0000)
committerVasilis Tsiligiannis <acinonyx@openwrt.gr>
Wed, 10 Jun 2009 21:52:07 +0000 (21:52 +0000)
SVN-Revision: 16405

package/base-files/files/lib/upgrade/common.sh

index 2750018e2b03b662fb6004715e7ad3cba41a0a1f..ef7ce57e7ec61ba6ee48e5436787f8799d477b56 100644 (file)
@@ -116,7 +116,7 @@ get_image() {
 }
 
 get_magic_word() {
-       get_image "$1" | dd bs=2 count=1 2>/dev/null | hexdump -C | awk '$2 { print $2 $3 }'
+       get_image "$1" | dd bs=2 count=1 2>/dev/null | hexdump -n 2 -e '1/1 "%02x"'
 }
 
 refresh_mtd_partitions() {