tools: docker/env.sh: only allow run in host system

Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
This commit is contained in:
Wu Zhangjin 2020-04-30 11:46:44 +08:00
parent ee302f1a8c
commit 2401543ca4
1 changed files with 7 additions and 1 deletions

View File

@ -1,8 +1,14 @@
#!/bin/bash
#
# env.sh -- list current system information
# env.sh -- list current system information of running docker
#
# dump system information of lab is not meaningful
if [ -d '/configs' ]; then
echo "LOG: Please run this in host system, not in lab."
exit 0
fi
# Hardware
echo "Product: `cat /sys/class/dmi/id/product_name`"