Skip to content
This repository has been archived by the owner on Apr 12, 2020. It is now read-only.

check_ovz 出错 #21

Closed
neighbads opened this issue Feb 26, 2018 · 1 comment
Closed

check_ovz 出错 #21

neighbads opened this issue Feb 26, 2018 · 1 comment
Labels

Comments

@neighbads
Copy link

neighbads commented Feb 26, 2018

hiformance ovz 回显两个。

[root@localhost home]# virt-what
openvz
lxc

可以改成包含判断

check_ovz(){
	yum update && yum install -y virt-what
	[[ ! "`virt-what`" =~ "openvz" ]] && echo -e "${Error} only support OpenVZ !" && exit 1
}
@nanqinlang
Copy link
Collaborator

如果是这种特殊情况, 安全起见当然是终止脚本.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants