Author: hauke
Date: 2016-04-17 15:24:30 +0200 (Sun, 17 Apr 2016)
New Revision: 49190

Modified:
   trunk/target/linux/x86/base-files/lib/upgrade/platform.sh
Log:
x86: fix platform_export_bootpart() for Xen virtual disks

Virtual disk devices in a Xen virtual machine (DomU) can be /dev/xvda,
/dev/xvdb and so on with partitions like /dev/xdva1. Devices named like
this where not considered before. This resulted in a non working
sysupgrade, because the boot partition could not be found.

Signed-off-by: Alexander Dahl <[email protected]>
Suggested-by: Matthias Schiffer <[email protected]>
Signed-off-by: Hauke Mehrtens <[email protected]>


Modified: trunk/target/linux/x86/base-files/lib/upgrade/platform.sh
===================================================================
--- trunk/target/linux/x86/base-files/lib/upgrade/platform.sh   2016-04-17 
12:53:31 UTC (rev 49189)
+++ trunk/target/linux/x86/base-files/lib/upgrade/platform.sh   2016-04-17 
13:24:30 UTC (rev 49190)
@@ -17,7 +17,7 @@
                        
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]; do
+                               for disk in /dev/[hsv]d[a-z] /dev/xvd[a-z]; do
                                        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"
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to