script: fix a minor bug in launch_xenomai.sh
There a bug in substring detection, fix it. Tracked-On: #5183 Signed-off-by: Tw <wei.tan@intel.com>
This commit is contained in:
parent
54975e4629
commit
42567c9a1c
|
@ -180,7 +180,7 @@ elif [ ! -z $disk ];then
|
||||||
|
|
||||||
# detect partition information
|
# detect partition information
|
||||||
disk_part_nr=$(basename $disk| sed 's/.*\([0-9]$\)/\1/')
|
disk_part_nr=$(basename $disk| sed 's/.*\([0-9]$\)/\1/')
|
||||||
if grep -q "nvme" "$disk"; then
|
if [[ $disk =~ "nvme" ]]; then
|
||||||
vdisk=/dev/nvme0n1p$disk_part_nr
|
vdisk=/dev/nvme0n1p$disk_part_nr
|
||||||
else
|
else
|
||||||
vdisk=/dev/sda$disk_part_nr
|
vdisk=/dev/sda$disk_part_nr
|
||||||
|
|
Loading…
Reference in New Issue