summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Yang <yangyang1@zte.com.cn>2018-09-10 09:09:59 +0800
committerAlex Yang <yangyang1@zte.com.cn>2018-09-10 09:09:59 +0800
commit560eb13d6468f142d6aaaae78f85bc22a6acc7cf (patch)
tree8273792f68b471c0ebb8f0ca3178a2451a0fd416
parent5012c278224472d7964e3e8abd9392c06869ded4 (diff)
Fix loop device nameHEADmaster
In [1], ${loopdevice:0:5} is wrong when loopdevice is loop13p1. [1] https://build.opnfv.org/ci/job/daisy-kolla-build-master/36/console Change-Id: I3bfcf771c8b510f9c5c1f853a1a61a299106d5dc Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
-rwxr-xr-xtools/daisy-img-modify.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/daisy-img-modify.sh b/tools/daisy-img-modify.sh
index ff1ff43..6d2ff53 100755
--- a/tools/daisy-img-modify.sh
+++ b/tools/daisy-img-modify.sh
@@ -165,8 +165,8 @@ resize() {
kpartx -av $raw_imgfile
sleep 2
dmsetup ls
- fdisk -l /dev/${loopdevice:0:5} || true
- growpart /dev/${loopdevice:0:5} 1
+ fdisk -l /dev/${loopdevice:0:-2} || true
+ growpart /dev/${loopdevice:0:-2} 1
dmsetup clear $loopdevice
kpartx -dv $raw_imgfile || eliminate
}
@@ -179,7 +179,7 @@ setup() {
kpartx -av $raw_imgfile
sleep 2
dmsetup ls
- fdisk -l /dev/${loopdevice:0:5} || true
+ fdisk -l /dev/${loopdevice:0:-2} || true
if [ "xfs" = "$(blkid -o value -s TYPE /dev/mapper/$loopdevice)" ]; then
mountopts="-o nouuid"