[PATCH compass-ci 2/2] sbin/download-rootfs: not to download if machine is virtual

12 Apr
2021
12 Apr
'21
6:29 p.m.
[why] we not support to run qemu in a virtual machine, so download os rootfs is unnecessary. Signed-off-by: Liu Yinsi <liuyinsi@163.com> --- sbin/download-rootfs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sbin/download-rootfs b/sbin/download-rootfs index f8c245d..68a6803 100755 --- a/sbin/download-rootfs +++ b/sbin/download-rootfs @@ -37,4 +37,9 @@ download_os_rootfs() rm -rf ${os_version}.cgz } -download_os_rootfs +is_virtual() +{ + dmidecode -s system-product-name | grep -iq "virtual" +} + +is_virtual || download_os_rootfs -- 2.23.0
1416
Age (days ago)
1416
Last active (days ago)
0 comments
1 participants
participants (1)
-
Liu Yinsi