代码拉取完成,页面将自动刷新
#!/bin/bash
# start vm automatically
line=`systemctl status vmware | grep "active (running)"`
case "$1" in
node1)
if [ ! "$line" ]; then
systemctl start vmware
fi
vmplayer /develop/vm/node1/centos7.vmx 1>/dev/null 2>&1 &
;;
node2)
if [ ! "$line" ]; then
systemctl start vmware
fi
vmplayer /develop/vm/node2/centos7.vmx 1>/dev/null 2>&1 &
;;
node3)
if [ ! "$line" ]; then
systemctl start vmware
fi
vmplayer /develop/vm/node3/centos7.vmx 1>/dev/null 2>&1 &
;;
halo)
if [ ! "$line" ]; then
systemctl start vmware
fi
vmplayer /develop/vm/halo/centos7.vmx 1>/dev/null 2>&1 &
;;
xp)
if [ ! "$line" ]; then
systemctl start vmware
fi
vmplayer /develop/vm/xp/WinXP.vmx 1>/dev/null 2>&1 &
;;
win7)
if [ ! "$line" ]; then
systemctl start vmware
fi
vmplayer /develop/vm/win7/win7.vmx 1>/dev/null 2>&1 &
;;
bd)
if [ ! "$line" ]; then
systemctl start vmware
fi
vmplayer /develop/vm/node1/centos7.vmx 1>/dev/null 2>&1 &
vmplayer /develop/vm/node2/centos7.vmx 1>/dev/null 2>&1 &
vmplayer /develop/vm/node3/centos7.vmx 1>/dev/null 2>&1 &
;;
-h)
echo version 1.0
echo Usage: vm {node1 \| node2 \| node3 \| bd \| halo \| xp \| win7}
echo Additional options:
echo " -h"
echo " -v"
;;
-v)
echo vm version: 1.0
;;
*)
echo parameter error! Usage: vm {node1 \| node2 \| node3 \| bd \| halo \| xp \| win7 \| -v \| -h}
;;
esac
# example below:
# vmware-networks version: 0.1
# Usage: vmware-networks [--verbose | -v] <option>
# Use exactly one of these commands:
# --postinstall <component-name>,<old-version>,<new-version>
# --migrate-network-settings <location of settings file>
# --start
# --stop
# --status
# Additional options:
# --help | -h
# --version
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。