diff options
author | Luka Perkov <luka@openwrt.org> | 2016-05-10 22:36:06 +0000 |
---|---|---|
committer | Luka Perkov <luka@openwrt.org> | 2016-06-19 19:25:09 +0200 |
commit | cb7d4e02768be1e4385993a80501adc8d3778cf6 (patch) | |
tree | 862d4750afa8bfeeaab1a9bde52ddd48ae32217a /target/linux/x86/base-files | |
parent | 90d61fead4eb499edcc1b1b7cc80c70280aaad7e (diff) | |
download | master-187ad058-cb7d4e02768be1e4385993a80501adc8d3778cf6.tar.gz master-187ad058-cb7d4e02768be1e4385993a80501adc8d3778cf6.tar.bz2 master-187ad058-cb7d4e02768be1e4385993a80501adc8d3778cf6.zip |
x86: search PARTUUID in any block device
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49319 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/x86/base-files')
-rw-r--r-- | target/linux/x86/base-files/lib/upgrade/platform.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/target/linux/x86/base-files/lib/upgrade/platform.sh b/target/linux/x86/base-files/lib/upgrade/platform.sh index f12deebf64..29eac77dfb 100644 --- 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" |