projects
/
openwrt
/
svn-archive
/
openwrt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b13f67
)
x86: search PARTUUID in any block device
author
Luka Perkov
<luka@openwrt.org>
Tue, 10 May 2016 22:36:06 +0000
(22:36 +0000)
committer
Luka Perkov
<luka@openwrt.org>
Tue, 10 May 2016 22:36:06 +0000
(22:36 +0000)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
SVN-Revision: 49319
target/linux/x86/base-files/lib/upgrade/platform.sh
patch
|
blob
|
history
diff --git
a/target/linux/x86/base-files/lib/upgrade/platform.sh
b/target/linux/x86/base-files/lib/upgrade/platform.sh
index f12deebf6484df6f3f69e453ad67688a76d57972..29eac77dfb0ae52f241696f3f62dce7d16106b20 100644
(file)
--- a/
target/linux/x86/base-files/lib/upgrade/platform.sh
+++ b/
target/linux/x86/base-files/lib/upgrade/platform.sh
@@
-17,7
+17,8
@@
platform_export_bootpart() {
PARTUUID=[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]-02)
uuid="${disk#PARTUUID=}"
uuid="${uuid%-02}"
- for disk in /dev/[hsv]d[a-z] /dev/xvd[a-z]; do
+ for disk in /dev/*; do
+ [ -b "$disk" ] || continue
set -- $(dd if=$disk bs=1 skip=440 count=4 2>/dev/null | hexdump -v -e '4/1 "%02x "')
if [ "$4$3$2$1" = "$uuid" ]; then
export BOOTPART="${disk}1"