Skip to content

Commit ea9bd56

Browse files
committed
added in_vmware
1 parent a282b60 commit ea9bd56

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bash-lite.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,13 @@ if_centos() {
222222
fi
223223
fi
224224
}
225+
in_vmware() {
226+
if cmd_exists hostnamectl; then
227+
$SUDO hostnamectl | grep -E 'Virtualization: ' | grep -qEi 'vmware'
228+
else
229+
false
230+
fi
231+
}
225232
in_vm() {
226233
if cmd_exists hostnamectl; then
227234
# dbg "checking hostnamectl"

0 commit comments

Comments
 (0)