From: Luka Perkov Date: Tue, 10 May 2016 22:36:06 +0000 (+0000) Subject: x86: search PARTUUID in any block device X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2d4451b70a4344c9a7a2fdf585bef0aec132929f;p=openwrt%2Fsvn-archive%2Fopenwrt.git x86: search PARTUUID in any block device Signed-off-by: Jo-Philipp Wich SVN-Revision: 49319 --- 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"