!/bin/bash
root权限
if [ $UID -ne 0 ];then
echo "没有root权限,无法执行!"
echo 'You are not root, can not run it!'
exit 1
fi
online test
NET=1
ping mirrors.aliyun.com -c 1 &>/dev/null
if [ $? -ne 0 ];then
echo -e "
if [ $UID -ne 0 ];then
echo "没有root权限,无法执行!"
echo 'You are not root, can not run it!'
exit 1
fi
NET=1
ping mirrors.aliyun.com -c 1 &>/dev/null
if [ $? -ne 0 ];then
echo -e "