Don't hard code second disk in asdc_install.sh 31/3831/1
authorEthan Lynn <ethanlynnl@vmware.com>
Wed, 3 May 2017 08:07:04 +0000 (16:07 +0800)
committerEthan Lynn <ethanlynnl@vmware.com>
Wed, 3 May 2017 08:11:17 +0000 (16:11 +0800)
Some openstack env will reconignized the second disk as 'sdb', so
it's better avoid to hard code 'vdb' in asdc_install.sh.

Change-Id: I8e7f77931b70c71f3f27061623cc928a96c40f6c
Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
boot/asdc_install.sh

index 5ef620c..2f07b23 100644 (file)
@@ -70,8 +70,8 @@ if [[ $CLOUD_ENV == "rackspace" ]]
 then
        DISK="xvdb"
 else
-       DISK="vdb"
-       sed -i "s/xvdb/vdb/g" /opt/asdc_ext_volume_partitions.txt
+       DISK=$(ls /dev |grep -e '^.*db$')
+       sed -i "s/xvdb/$DISK/g" /opt/asdc_ext_volume_partitions.txt
 fi
 
 sfdisk /dev/$DISK < /opt/asdc_ext_volume_partitions.txt